/* =============================================================
   iCafe Sales & Inventory Management System — Master Stylesheet
   ============================================================= */

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brown-dark:      #2C1810;
    --brown-mid:       #5C3317;
    --brown-warm:      #8B4513;
    --brown-btn:       #6B3A2A;
    --brown-btn-hover: #4A2519;
    --accent-gold:     #D4A96A;
    --cream:           #FDF8F4;
    --cream-dark:      #F5EDE3;
    --bg-main:         #F7F3EF;
    --text-dark:       #1A0F0A;
    --text-mid:        #5A3D2B;
    --text-light:      #8B6E5A;
    --white:           #FFFFFF;
    --sidebar-w:       230px;
    --success:         #2E7D52;
    --error:           #C0392B;
    --warning:         #D68910;
    --info:            #1A6B9A;
    --border:          #E8DDD5;
    --shadow:          0 2px 12px rgba(44,24,16,0.08);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--brown-dark);
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 28px 24px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-box {
    width: 38px; height: 38px;
    background: var(--accent-gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.sidebar-logo .logo-box i { font-size: 18px; color: var(--brown-dark); }

.sidebar-logo span {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--white);
}

.sidebar-nav { flex: 1; padding: 20px 0; }

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 0 24px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 24px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.nav-item i { width: 18px; font-size: 15px; }

.nav-item:hover {
    background: rgba(255,255,255,0.07);
    color: var(--white);
}

.nav-item.active {
    background: rgba(212,169,106,0.15);
    color: var(--accent-gold);
    border-left-color: var(--accent-gold);
}

.sidebar-footer {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 24px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-footer a:hover { color: #F5A5A5; background: rgba(192,57,43,0.1); }
.sidebar-footer a i { width: 18px; font-size: 15px; }

/* ═══════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* TOPBAR */
.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.topbar-left .hamburger {
    background: none; border: none; cursor: pointer;
    color: var(--text-mid); font-size: 18px;
}

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-greeting { font-size: 14px; color: var(--text-mid); font-weight: 500; }
.topbar-greeting strong { color: var(--brown-dark); }

.role-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-badge.admin   { background: #FDF3E3; color: var(--warning); }
.role-badge.cashier { background: #EBF5FB; color: var(--info); }

.avatar {
    width: 38px; height: 38px;
    background: var(--brown-warm);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 15px;
    cursor: pointer;
}

/* PAGE BODY */
.page-body { padding: 32px; flex: 1; }
.page-header { margin-bottom: 28px; }

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    color: var(--brown-dark);
}

.page-header p { font-size: 14px; color: var(--text-light); margin-top: 4px; }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-pad { padding: 24px; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary { background: var(--brown-btn); color: white; }
.btn-primary:hover {
    background: var(--brown-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44,24,16,0.25);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #256642; }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { background: #a93226; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #b7770d; }

.btn-outline {
    background: transparent;
    color: var(--text-mid);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--cream); }

.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ═══════════════════════════════════════
   TABLE
═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 14px 18px;
    text-align: left;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 18px;
    font-size: 14px;
    border-bottom: 1px solid #F0E8E0;
    color: var(--text-dark);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--cream); }

/* ═══════════════════════════════════════
   BADGES
═══════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #E8F6EF; color: var(--success); }
.badge-warning { background: #FDF3E3; color: var(--warning); }
.badge-danger  { background: #FDEDEC; color: var(--error); }
.badge-info    { background: #EBF5FB; color: var(--info); }

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--cream);
    transition: all 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--brown-warm);
    background: white;
    box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}

/* ═══════════════════════════════════════
   MODAL
═══════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44,24,16,0.55);
    z-index: 999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-overlay.open { display: flex; }

.modal {
    background: white;
    border-radius: 20px;
    padding: 36px;
    width: 480px;
    max-width: 95vw;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.93) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--brown-dark);
}

.modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 20px; color: var(--text-light);
}
.modal-close:hover { color: var(--error); }

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 28px;
}

/* ═══════════════════════════════════════
   ALERTS
═══════════════════════════════════════ */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert-success { background: #E8F6EF; color: var(--success); border: 1px solid #A9DFBF; }
.alert-error   { background: #FDEDEC; color: var(--error);   border: 1px solid #F5B7B1; }
.alert-warning { background: #FDF3E3; color: var(--warning); border: 1px solid #FAD7A0; }
.alert-info    { background: #EBF5FB; color: var(--info);    border: 1px solid #AED6F1; }

/* ═══════════════════════════════════════
   PAGINATION
═══════════════════════════════════════ */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 20px; }

.page-btn {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-mid);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
    text-decoration: none;
}

.page-btn.active { background: var(--brown-btn); color: white; border-color: var(--brown-btn); }
.page-btn:hover:not(.active) { background: var(--cream); }

/* ═══════════════════════════════════════
   GRID HELPERS
═══════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ═══════════════════════════════════════
   TOAST
═══════════════════════════════════════ */
#toast {
    position: fixed;
    bottom: 28px; right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-item {
    background: var(--brown-dark);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--accent-gold);
}

.toast-item.success { border-left-color: #2ECC71; }
.toast-item.error   { border-left-color: var(--error); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════
   DASHBOARD — CAFE BANNER
═══════════════════════════════════════ */
.cafe-banner {
    background: linear-gradient(135deg, #2C1810 0%, #5C3317 50%, #8B4513 100%);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.cafe-banner::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 220px; height: 220px;
    background: rgba(212,169,106,0.12);
    border-radius: 50%;
}

.cafe-banner::after {
    content: '';
    position: absolute;
    bottom: -60px; right: 120px;
    width: 160px; height: 160px;
    background: rgba(212,169,106,0.08);
    border-radius: 50%;
}

.banner-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: white;
    margin-bottom: 6px;
}

.banner-left p {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
}

.banner-badges { display: flex; gap: 10px; flex-wrap: wrap; }

.banner-badge {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.banner-badge i { color: #D4A96A; }

.banner-right { position: relative; z-index: 2; text-align: center; }
.banner-right .big-icon {
    font-size: 80px;
    line-height: 1;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.3));
}

/* ═══════════════════════════════════════
   DASHBOARD — STAT CARDS
═══════════════════════════════════════ */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(44,24,16,0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
}

.stat-card.green::before  { background: linear-gradient(90deg, #2E7D52, #52C78A); }
.stat-card.blue::before   { background: linear-gradient(90deg, #1A6B9A, #3498DB); }
.stat-card.orange::before { background: linear-gradient(90deg, #D68910, #F39C12); }
.stat-card.red::before    { background: linear-gradient(90deg, #C0392B, #E74C3C); }

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-sub { font-size: 12px; font-weight: 600; }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   DASHBOARD — CAFE STRIP
═══════════════════════════════════════ */
.cafe-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.cafe-strip-item {
    background: white;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
}

.cafe-strip-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2C1810, #5C3317);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cafe-strip-text .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    margin-bottom: 3px;
}

.cafe-strip-text .value {
    font-size: 15px;
    font-weight: 700;
    color: var(--brown-dark);
}

/* ═══════════════════════════════════════
   DASHBOARD — QUICK ACTIONS
═══════════════════════════════════════ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

/* Admin has 4 quick actions, cashier has 2 */
.quick-actions.two-col { grid-template-columns: repeat(2, 1fr); max-width: 400px; }

.quick-btn {
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.quick-btn:hover {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44,24,16,0.2);
}

.quick-btn:hover .quick-icon { background: rgba(255,255,255,0.15); }
.quick-btn:hover .quick-label { color: rgba(255,255,255,0.85); }

.quick-icon {
    width: 44px; height: 44px;
    background: var(--cream);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    margin: 0 auto 10px;
    transition: all 0.2s;
    color: var(--brown-warm);
}

.quick-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.quick-label { font-size: 11px; color: var(--text-light); transition: color 0.2s; }

/* ═══════════════════════════════════════
   DASHBOARD — SECTION TITLE
═══════════════════════════════════════ */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--brown-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ═══════════════════════════════════════
   DASHBOARD — LOW STOCK WARNING
═══════════════════════════════════════ */
.low-stock-bar {
    background: linear-gradient(135deg, #FDF3E3, #FDEBD0);
    border: 1.5px solid #FAD7A0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.low-stock-bar i { font-size: 22px; color: #D68910; }
.low-stock-bar .text strong { color: #9A5F0A; font-size: 14px; }
.low-stock-bar .text p { font-size: 12px; color: #B7770D; margin-top: 2px; }

.low-stock-bar a {
    margin-left: auto;
    background: #D68910;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.low-stock-bar a:hover { background: #B7770D; }

/* Live clock */
#live-time { font-weight: 700; color: white; letter-spacing: 0.5px; }
#live-date  { font-weight: 600; }

/* ═══════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════ */
.settings-banner {
    background: linear-gradient(135deg, #2C1810 0%, #5C3317 55%, #8B4513 100%);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.settings-banner::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(212,169,106,0.1);
    border-radius: 50%;
}

.settings-banner::after {
    content: '';
    position: absolute;
    bottom: -40px; right: 180px;
    width: 140px; height: 140px;
    background: rgba(212,169,106,0.06);
    border-radius: 50%;
}

.banner-text h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: white; margin-bottom: 6px; }
.banner-text p  { font-size: 13px; color: rgba(255,255,255,0.6); }

.banner-meta { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.banner-pill {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.banner-pill i { color: #D4A96A; }

.banner-icon-wrap {
    position: relative; z-index: 2;
    width: 64px; height: 64px;
    background: rgba(212,169,106,0.2);
    border-radius: 18px;
    border: 1px solid rgba(212,169,106,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.settings-card {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(44,24,16,0.06);
    overflow: hidden;
    transition: box-shadow 0.2s;
    margin-bottom: 24px;
}

.settings-card:hover { box-shadow: 0 6px 28px rgba(44,24,16,0.10); }

.settings-card-header {
    padding: 22px 28px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(to right, #FDFAF7, white);
}

.settings-card-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

.settings-card-icon.profile-icon  { background: linear-gradient(135deg, #EBF5FB, #D6EAF8); color: #1A6B9A; }
.settings-card-icon.password-icon { background: linear-gradient(135deg, #FDF3E3, #FDEBD0); color: #D68910; }
.settings-card-icon.security-icon { background: linear-gradient(135deg, #E8F6EF, #D5F5E3); color: #2E7D52; }

.settings-card-header-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--brown-dark);
    margin-bottom: 2px;
}

.settings-card-header-text p { font-size: 12px; color: var(--text-light); }
.settings-card-body { padding: 26px 28px 28px; }

.field-group { margin-bottom: 20px; }

.field-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.9px;
    margin-bottom: 8px;
}

.field-input-wrap { position: relative; }

.field-input-wrap i {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
    pointer-events: none;
}

.field-control {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--cream);
    transition: all 0.2s;
    outline: none;
}

.field-control:focus {
    border-color: var(--brown-warm);
    background: white;
    box-shadow: 0 0 0 3px rgba(139,69,19,0.08);
}

.field-control:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #F0EAE4;
}

.field-hint {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5C3317, #2C1810);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
    margin-top: 6px;
}

.btn-save:hover {
    background: linear-gradient(135deg, #2C1810, #1a0e08);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44,24,16,0.3);
}

.btn-save:active { transform: translateY(0); }

.strength-bar { display: flex; gap: 4px; margin-top: 8px; }
.strength-seg { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.strength-label { font-size: 11px; margin-top: 5px; font-weight: 600; }

.avatar-banner {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #D4A96A, #8B4513);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 22px;
    border: 3px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════ */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a0e08;
    min-height: 100vh;
}

.bg-scene { position: fixed; inset: 0; z-index: 0; }

.bg-scene::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(92,51,23,0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(139,69,19,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(44,24,16,0.8) 0%, transparent 60%),
        linear-gradient(160deg, #1a0e08 0%, #2C1810 40%, #3d2010 70%, #1a0e08 100%);
}

.bg-photo {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1554118811-1e0d58224f24?w=1800&q=85') center/cover no-repeat;
    opacity: 0.18;
    mix-blend-mode: luminosity;
}

.lamp-left {
    position: absolute; top: -80px; left: 10%;
    width: 300px; height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(212,169,106,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.lamp-right {
    position: absolute; top: -80px; right: 15%;
    width: 250px; height: 350px;
    background: radial-gradient(ellipse at 50% 0%, rgba(212,169,106,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.steam-wrap {
    position: absolute; bottom: 0; left: 0; right: 0; height: 100%;
    pointer-events: none; overflow: hidden;
}

.steam {
    position: absolute; bottom: 0; width: 2px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
    animation: rise linear infinite;
}

.steam:nth-child(1)  { left: 8%;  height: 180px; animation-duration: 8s;   animation-delay: 0s;   width: 3px; }
.steam:nth-child(2)  { left: 15%; height: 120px; animation-duration: 11s;  animation-delay: 2s; }
.steam:nth-child(3)  { left: 25%; height: 200px; animation-duration: 9s;   animation-delay: 1s;   width: 3px; }
.steam:nth-child(4)  { left: 35%; height: 150px; animation-duration: 13s;  animation-delay: 4s; }
.steam:nth-child(5)  { left: 48%; height: 220px; animation-duration: 7s;   animation-delay: 0.5s; width: 4px; }
.steam:nth-child(6)  { left: 60%; height: 140px; animation-duration: 10s;  animation-delay: 3s; }
.steam:nth-child(7)  { left: 72%; height: 190px; animation-duration: 12s;  animation-delay: 1.5s; width: 3px; }
.steam:nth-child(8)  { left: 82%; height: 160px; animation-duration: 8.5s; animation-delay: 2.5s; }
.steam:nth-child(9)  { left: 90%; height: 130px; animation-duration: 14s;  animation-delay: 5s; }
.steam:nth-child(10) { left: 55%; height: 100px; animation-duration: 9.5s; animation-delay: 6s; }

@keyframes rise {
    0%   { transform: translateY(0) scaleX(1);   opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-100vh) scaleX(2); opacity: 0; }
}

.coffee-icons { position: absolute; inset: 0; pointer-events: none; }

.ci {
    position: absolute; font-size: 80px; opacity: 0.03;
    animation: floatIcon linear infinite; filter: blur(1px);
}

.ci:nth-child(1) { left: 5%;  top: 10%; font-size: 120px; animation-duration: 20s; animation-delay: 0s; }
.ci:nth-child(2) { left: 80%; top: 5%;  font-size: 90px;  animation-duration: 25s; animation-delay: 5s; }
.ci:nth-child(3) { left: 60%; top: 60%; font-size: 140px; animation-duration: 18s; animation-delay: 2s; }
.ci:nth-child(4) { left: 20%; top: 70%; font-size: 100px; animation-duration: 22s; animation-delay: 8s; }
.ci:nth-child(5) { left: 45%; top: 20%; font-size: 80px;  animation-duration: 30s; animation-delay: 3s; }

@keyframes floatIcon {
    0%   { transform: translateY(0) rotate(0deg);    opacity: 0.03; }
    50%  { transform: translateY(-30px) rotate(8deg); opacity: 0.06; }
    100% { transform: translateY(0) rotate(0deg);    opacity: 0.03; }
}

.cafe-watermark {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    font-family: 'Playfair Display', serif; font-size: 120px;
    color: rgba(212,169,106,0.04); white-space: nowrap;
    pointer-events: none; letter-spacing: 20px;
}

.side-panel-left, .side-panel-right {
    position: fixed; top: 0; bottom: 0; width: 220px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 32px; padding: 40px 20px; z-index: 2;
}

.side-panel-left  { left: 0; }
.side-panel-right { right: 0; }

.cafe-feature { text-align: center; color: rgba(212,169,106,0.7); }
.cafe-feature .icon { font-size: 28px; margin-bottom: 8px; display: block; }
.cafe-feature .title { font-family: 'Playfair Display', serif; font-size: 14px; color: rgba(212,169,106,0.9); margin-bottom: 4px; }
.cafe-feature .desc  { font-size: 11px; color: rgba(255,255,255,0.3); line-height: 1.4; }

.feature-divider {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(212,169,106,0.3), transparent);
}

.cafe-bottom-strip {
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 16px 40px;
    display: flex; align-items: center; justify-content: center; gap: 40px;
    border-top: 1px solid rgba(212,169,106,0.1);
    background: rgba(26,14,8,0.6);
    backdrop-filter: blur(8px);
    z-index: 2;
}

.strip-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.3); font-size: 12px; }
.strip-item i { color: rgba(212,169,106,0.5); font-size: 13px; }

.login-container {
    position: relative; z-index: 10; width: 440px;
    animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.login-card {
    background: rgba(255,255,255,0.97);
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow:
        0 50px 100px rgba(0,0,0,0.6),
        0 0 0 1px rgba(212,169,106,0.2),
        inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
}

.login-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, transparent, #D4A96A, #8B4513, #D4A96A, transparent);
    border-radius: 24px 24px 0 0;
    margin: -48px -44px 40px;
}

.logo-area { text-align: center; margin-bottom: 28px; }

.logo-icon {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, #2C1810, #5C3317);
    border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(44,24,16,0.4);
    border: 1px solid rgba(212,169,106,0.3);
}

.logo-icon i { font-size: 30px; color: #D4A96A; }

.logo-area h1 {
    font-family: 'Playfair Display', serif;
    font-size: 34px; color: #2C1810; letter-spacing: -0.5px;
}

.logo-area p {
    font-size: 11px; color: #8B6E5A; margin-top: 5px;
    font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
}

.gold-divider { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; }

.gold-divider::before, .gold-divider::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(to right, transparent, rgba(212,169,106,0.4), transparent);
}

.gold-divider span {
    font-size: 11px; color: #D4A96A; letter-spacing: 1px;
    text-transform: uppercase; font-weight: 600;
}

.welcome-text { text-align: center; font-size: 14px; color: #5A3D2B; margin-bottom: 24px; }

.alert-box {
    border-radius: 10px; padding: 12px 16px; font-size: 13px;
    margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
}

.alert-box.alert-error   { background: #FEE8E6; border: 1px solid #FBBDB8; color: #C0392B; }
.alert-box.alert-success { background: #E8F6EF; border: 1px solid #A9DFBF; color: #2E7D52; }

.input-wrap { position: relative; }

.input-wrap i.icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: #8B6E5A; font-size: 14px; pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border: 1.5px solid #E8DDD5;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px; color: #1A0F0A; background: #FDF8F4;
    transition: all 0.25s; outline: none;
}

.input-wrap input:focus {
    border-color: #8B4513; background: white;
    box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}

.toggle-pw {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #8B6E5A; font-size: 14px; padding: 4px;
}

.toggle-pw:hover { color: #8B4513; }

/* Remove browser-native password reveal / clear buttons so only our custom eye is visible */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-password-reveal-button,
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-textfield-decoration {
    display: none !important;
}

.form-options {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; font-size: 13px;
}

.remember-me { display: flex; align-items: center; gap: 8px; color: #5A3D2B; cursor: pointer; }
.remember-me input[type="checkbox"] { width: 16px; height: 16px; accent-color: #6B3A2A; }

.forgot-link {
    color: #8B4513; text-decoration: none; font-weight: 600; font-size: 13px;
    cursor: pointer; background: none; border: none; padding: 0;
    font-family: 'DM Sans', sans-serif; transition: color 0.2s;
}

.forgot-link:hover { color: #2C1810; text-decoration: underline; }

.btn-login {
    width: 100%; padding: 15px;
    background: linear-gradient(135deg, #6B3A2A, #5C3317);
    color: white; border: none; border-radius: 12px;
    font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all 0.25s; letter-spacing: 0.5px;
    position: relative; overflow: hidden;
}

.btn-login::before {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.4s;
}

.btn-login:hover::before { left: 100%; }

.btn-login:hover {
    background: linear-gradient(135deg, #4A2519, #6B3A2A);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(44,24,16,0.4);
}

.btn-login:active { transform: translateY(0); }

.footer-text { text-align: center; margin-top: 24px; font-size: 12px; color: #8B6E5A; }

/* Login modal override */
.modal-overlay.login-modal {
    background: rgba(26,14,8,0.75);
    backdrop-filter: blur(6px);
}

.modal-box {
    background: white; border-radius: 20px; padding: 40px;
    width: 420px; max-width: 95vw;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    animation: popIn 0.3s cubic-bezier(0.16,1,0.3,1);
    position: relative;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.modal-box::before {
    content: '';
    display: block; height: 4px;
    background: linear-gradient(90deg, transparent, #D4A96A, #8B4513, #D4A96A, transparent);
    border-radius: 20px 20px 0 0;
    margin: -40px -40px 32px;
}

.modal-box .modal-close {
    background: #F5EDE3; border: none; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #5A3D2B; font-size: 14px; transition: all 0.2s;
}

.modal-box .modal-close:hover { background: #2C1810; color: white; }

.modal-subtitle { font-size: 13px; color: #8B6E5A; margin-bottom: 24px; line-height: 1.5; }

.modal-alert {
    border-radius: 10px; padding: 12px 16px; font-size: 13px;
    margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

.modal-alert.success { background: #E8F6EF; border: 1px solid #A9DFBF; color: #2E7D52; }
.modal-alert.error   { background: #FEE8E6; border: 1px solid #FBBDB8; color: #C0392B; }
.modal-alert.info    { background: #EBF5FB; border: 1px solid #AED6F1; color: #1A6B9A; }

.modal-footer-btns { display: flex; gap: 10px; margin-top: 24px; }

.btn-cancel {
    flex: 1; padding: 12px; background: #F5EDE3; color: #5A3D2B;
    border: none; border-radius: 10px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}

.btn-cancel:hover { background: #E8DDD5; }

.btn-submit {
    flex: 2; padding: 12px; background: #6B3A2A; color: white;
    border: none; border-radius: 10px;
    font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.2s;
}

.btn-submit:hover {
    background: #4A2519; transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(44,24,16,0.3);
}

/* Password reset request badge in topbar */
.notif-badge {
    background: var(--error); color: white;
    font-size: 10px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: -6px; margin-top: -10px;
    vertical-align: top;
}

/* Reset request cards in users.php */
.request-card {
    background: #FDF3E3;
    border: 1.5px solid #FAD7A0;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.request-card .req-info strong { font-size: 14px; color: var(--brown-dark); }
.request-card .req-info small  { font-size: 12px; color: var(--text-light); display: block; margin-top: 2px; }
.request-card .req-actions     { margin-left: auto; display: flex; gap: 8px; }

/* Decorative bg circles for settings */
.deco-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco-circle { position: absolute; border-radius: 50%; background: rgba(139,69,19,0.04); }
.deco-circle.c1 { width: 400px; height: 400px; top: -100px; right: -100px; }
.deco-circle.c2 { width: 250px; height: 250px; bottom: 100px; left: -80px; }
.deco-circle.c3 { width: 180px; height: 180px; bottom: 300px; right: 80px; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .side-panel-left, .side-panel-right { display: none; }
    .cafe-strip { grid-template-columns: 1fr 1fr; }
    .grid-4, .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4, .cafe-strip, .quick-actions { grid-template-columns: 1fr; }
    .page-body { padding: 16px; }
}
