:root {
    --primary: #FF5E57;
    --primary-hover: #FF3B30;
    --bg-dark: #1E1E24;
    --bg-light: #F4F6F8;
    --white: #FFFFFF;
    --text-main: #333333;
    --text-muted: #888888;
    --glass: rgba(255, 255, 255, 0.8);
    --border: #E0E0E0;
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg-light); color: var(--text-main); height: 100vh; overflow: hidden; }

a { text-decoration: none; color: inherit; }

/* Layout */
.app-container { display: flex; height: 100vh; }
.sidebar { width: 250px; background: var(--white); display: flex; flex-direction: column; padding: 20px; border-right: 1px solid var(--border); }
.content { flex: 1; overflow-y: auto; padding: 30px; position: relative; }
.full-width { padding: 0; display: flex; align-items: center; justify-content: center; background: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&q=80') center/cover; }

/* Sidebar */
.logo { font-size: 24px; font-weight: 700; color: var(--text-main); margin-bottom: 40px; }
.logo span { color: var(--primary); }
.menu a { display: block; padding: 12px 15px; margin-bottom: 8px; border-radius: 10px; color: var(--text-muted); font-weight: 500; transition: 0.3s; }
.menu a:hover, .menu a.active { background: #FFF0F0; color: var(--primary); }
.user-block { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.logout-btn { font-size: 14px; color: var(--primary); display: inline-block; margin-top: 5px; cursor: pointer;}

/* Forms (Login/Reg/Onboarding) */
.auth-card { background: var(--glass); backdrop-filter: blur(10px); padding: 40px; border-radius: 20px; width: 400px; box-shadow: var(--shadow); text-align: center; }
.auth-card h2 { margin-bottom: 20px; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px; color: var(--text-muted); text-transform: uppercase; }
.form-control { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; transition: 0.3s; }
.form-control:focus { border-color: var(--primary); outline: none; }
.btn { width: 100%; padding: 12px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-secondary { background: #EEE; color: #333; margin-top: 10px; }

/* Dashboard/POS */
.pos-layout { display: flex; gap: 20px; height: calc(100vh - 60px); }
.products-section { flex: 2; overflow-y: auto; padding-right: 10px; }
.cart-section { flex: 1; background: var(--white); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; }
.product-card { background: var(--white); padding: 15px; border-radius: 12px; cursor: pointer; transition: 0.2s; border: 1px solid transparent; text-align: center; box-shadow: var(--shadow); }
.product-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.p-name { font-weight: 600; margin: 10px 0 5px; }
.p-price { color: var(--primary); font-weight: 700; }
.p-avatar { width: 50px; height: 50px; background: #FFF0F0; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 20px; }

/* Cart */
.cart-items { flex: 1; overflow-y: auto; margin: 20px 0; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); animation: fadeIn 0.3s; }
.c-info div { font-weight: 500; font-size: 14px; }
.c-info small { color: var(--text-muted); font-size: 12px; }
.qty-badge { background: #333; color: white; padding: 2px 6px; border-radius: 4px; font-size: 11px; margin-left: 5px; }
.totals div { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 14px; }
.grand-total { font-weight: 700; font-size: 18px; color: var(--primary); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }

/* Alerts */
.alert { padding: 10px; margin-bottom: 20px; border-radius: 8px; text-align: center; }
.alert-warning { background: #FFF4E5; color: #663C00; }
.alert-success { background: #E6F4EA; color: #1E4620; }
.alert-danger { background: #FCE8E6; color: #C5221F; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Table for Products Page */
.table-container { background: white; padding: 20px; border-radius: 10px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #EEE; }
th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; }

/* Print Bill Preview Modal */
.print-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; z-index: 1000; }
.preview-content { background: white; padding: 20px; max-height: 90vh; overflow-y: auto; }
