/* ============================================================
   ALPHA NOVAA CRM — style.css
   Theme: White / Red / Black
   Mobile-first, Android-app-like for telecallers
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red:        #d0021b;
    --red-dark:   #a00115;
    --red-light:  #fff0f0;
    --black:      #111111;
    --gray-900:   #1a1a1a;
    --gray-700:   #374151;
    --gray-500:   #6b7280;
    --gray-300:   #d1d5db;
    --gray-100:   #f3f4f6;
    --white:      #ffffff;
    --green:      #16a34a;
    --green-light:#dcfce7;
    --orange:     #ea580c;
    --orange-light:#fff7ed;
    --blue:       #1d4ed8;
    --blue-light: #eff6ff;
    --shadow:     0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 30px rgba(0,0,0,0.12);
    --radius:     10px;
    --radius-sm:  6px;
}

html { font-size: 15px; height: 100%; }
body {
    font-family: 'Nunito', sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100%;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-box {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 35px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}
.login-box .logo-wrap { text-align: center; margin-bottom: 28px; }
.login-box .logo-wrap img { max-width: 180px; max-height: 70px; object-fit: contain; }
.login-box h2 { text-align: center; font-size: 20px; font-weight: 800; color: var(--black); margin-bottom: 6px; }
.login-box p.sub { text-align: center; color: var(--gray-500); font-size: 13px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm); font-size: 15px; transition: border 0.2s;
    background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--red);
}
.btn-primary {
    display: block; width: 100%; padding: 14px; background: var(--red);
    color: var(--white); font-size: 16px; font-weight: 800;
    border: none; border-radius: var(--radius-sm); transition: background 0.2s;
}
.btn-primary:hover { background: var(--red-dark); }
.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-danger { background: var(--red-light); color: var(--red-dark); border: 1px solid #fca5a5; }
.alert-success { background: var(--green-light); color: #15803d; border: 1px solid #86efac; }
.alert-warning { background: var(--orange-light); color: var(--orange); border: 1px solid #fdba74; }

/* ============================================================
   ADMIN / MANAGER LAYOUT (Desktop-first)
   ============================================================ */
.app-layout { display: flex; min-height: 100vh; overflow-x: hidden; }

.sidebar {
    width: 240px;
    height: 100vh;
    background: var(--black);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-logo {
    padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-logo img { max-height: 40px; max-width: 120px; object-fit: contain; }
.sidebar-logo .crm-label { color: var(--white); font-weight: 800; font-size: 14px; opacity: 0.7; }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section { padding: 6px 20px; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); text-transform: uppercase; margin-top: 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 600; transition: all 0.15s; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-item.active { background: var(--red); color: var(--white); }
.nav-item .icon { width: 18px; text-align: center; font-size: 16px; }

.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sidebar-user .avatar { width: 34px; height: 34px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: 14px; }
.sidebar-user .info .name { color: white; font-weight: 700; font-size: 14px; }
.sidebar-user .info .role { color: rgba(255,255,255,0.4); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-logout { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.5); font-size: 13px; font-weight: 600; padding: 8px 0; transition: color 0.15s; background: none; border: none; width: 100%; }
.btn-logout:hover { color: var(--red); }

.main-content {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
}
.topbar-title { font-size: 18px; font-weight: 800; color: var(--black); }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.page-body {
    padding: 24px 28px;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
}

/* Cards / Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); border-top: 4px solid var(--gray-300); }
.stat-card.red    { border-color: var(--red); }
.stat-card.green  { border-color: var(--green); }
.stat-card.orange { border-color: var(--orange); }
.stat-card.blue   { border-color: var(--blue); }
.stat-card.black  { border-color: var(--black); }
.stat-card .val { font-size: 32px; font-weight: 800; color: var(--black); line-height: 1; }
.stat-card .lbl { font-size: 13px; color: var(--gray-500); margin-top: 6px; font-weight: 600; }

/* Tables */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 16px; font-weight: 800; color: var(--black); }
.card-body { padding: 0; }
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { background: var(--gray-100); padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--gray-100); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-green { background: var(--green-light); color: #15803d; }
.badge-red   { background: var(--red-light); color: var(--red-dark); }
.badge-orange{ background: var(--orange-light); color: var(--orange); }
.badge-blue  { background: var(--blue-light); color: var(--blue); }
.badge-gray  { background: var(--gray-100); color: var(--gray-500); }
.badge-black { background: var(--gray-900); color: white; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; border: none; transition: all 0.15s; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-red    { background: var(--red); color: white; }
.btn-red:hover { background: var(--red-dark); }
.btn-black  { background: var(--black); color: white; }
.btn-black:hover { background: var(--gray-700); }
.btn-green  { background: var(--green); color: white; }
.btn-green:hover { background: #15803d; }
.btn-outline{ background: white; border: 2px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--black); }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-row.single { grid-template-columns: 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ============================================================
   TELECALLER APP LAYOUT (Mobile / Android App Style)
   ============================================================ */

/* App shell */
.tc-page {
    min-height: 100vh;
    background: var(--black);
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
}

/* App top bar */
.app-bar {
    background: var(--black);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.app-bar .app-logo img { height: 32px; object-fit: contain; }
.app-bar .app-title { font-size: 17px; font-weight: 800; color: white; }
.app-bar .app-right { display: flex; align-items: center; gap: 12px; }
.app-bar .app-user { font-size: 12px; color: rgba(255,255,255,0.5); }
.app-bar .btn-app-logout { background: rgba(255,255,255,0.06); border: none; color: rgba(255,255,255,0.6); padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }

/* App body scrollable */
.app-body { flex: 1; background: var(--gray-100); overflow-y: auto; padding-bottom: 80px; }

/* App bottom nav */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--black);
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 200;
}
.app-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    font-weight: 700;
    border: none;
    background: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}
.app-nav-item .nav-icon { font-size: 20px; margin-bottom: 3px; }
.app-nav-item.active { color: var(--red); }
.app-nav-item:hover { color: white; }

/* Dashboard home */
.tc-welcome {
    background: var(--black);
    padding: 20px 18px 28px;
    color: white;
}
.tc-welcome .greeting { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.tc-welcome .name { font-size: 22px; font-weight: 800; }
.tc-welcome .date-time { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 4px; }

.tc-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 18px;
    background: var(--black);
    padding-top: 0;
}
.tc-stat-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.tc-stat-box.highlight { background: var(--red); border-color: var(--red); }
.tc-stat-num { font-size: 30px; font-weight: 800; color: white; }
.tc-stat-lbl { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.tc-stat-box.highlight .tc-stat-lbl { color: rgba(255,255,255,0.8); }

/* Action section */
.tc-section { padding: 18px; }
.tc-section-title { font-size: 12px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }

.tc-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 18px;
    background: var(--white);
    border: none;
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    font-family: inherit;
}
.tc-action-btn .left { display: flex; align-items: center; gap: 12px; }
.tc-action-btn .icon-wrap { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.icon-wrap.red { background: var(--red-light); }
.icon-wrap.green { background: var(--green-light); }
.icon-wrap.orange { background: var(--orange-light); }
.icon-wrap.blue { background: var(--blue-light); }
.icon-wrap.black { background: var(--gray-100); }
.tc-action-btn .btn-label { font-size: 15px; font-weight: 700; color: var(--black); }
.tc-action-btn .btn-sub { font-size: 12px; color: var(--gray-500); margin-top: 1px; }
.tc-action-btn .arrow { font-size: 18px; color: var(--gray-300); }
.tc-action-btn .count-badge { background: var(--red); color: white; border-radius: 12px; padding: 2px 9px; font-size: 12px; font-weight: 800; }

/* List selector */
.list-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.list-card .lc-info .lc-name { font-size: 16px; font-weight: 700; }
.list-card .lc-info .lc-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.list-card .lc-stats { text-align: right; }
.list-card .lc-num { font-size: 20px; font-weight: 800; color: var(--red); }
.list-card .lc-lbl { font-size: 11px; color: var(--gray-500); }

/* Call screen */
.call-screen { background: var(--white); min-height: calc(100vh - 120px); }

.contact-header {
    background: var(--black);
    padding: 24px 18px 28px;
    color: white;
    text-align: center;
}
.contact-header .avatar-circle {
    width: 70px; height: 70px; border-radius: 50%;
    background: var(--red); display: flex; align-items: center;
    justify-content: center; font-size: 28px; font-weight: 800;
    margin: 0 auto 14px;
}
.contact-header .c-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.contact-header .c-phone { font-size: 16px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.contact-header .c-meta { font-size: 12px; color: rgba(255,255,255,0.4); }
.contact-header .c-attempt { display: inline-block; background: rgba(255,255,255,0.1); padding: 3px 12px; border-radius: 20px; font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 8px; }

.call-btn-wrap { padding: 18px; }
.call-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: var(--green);
    color: white;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(22,163,74,0.3);
}
.alt-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 10px;
    border: none;
}

/* Disposition grid */
.disposition-section { padding: 0 18px; }
.disposition-section h4 { font-size: 12px; font-weight: 800; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.disposition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.disp-btn {
    padding: 13px 8px;
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    text-align: center;
    transition: all 0.15s;
}
.disp-btn:hover { border-color: var(--gray-300); }
.disp-btn.selected { background: var(--black); color: white; border-color: var(--black); }
.disp-btn[data-color="#f59e0b"].selected { background: #f59e0b; border-color: #f59e0b; }
.disp-btn[data-color="#f97316"].selected { background: #f97316; border-color: #f97316; }
.disp-btn[data-color="#3b82f6"].selected { background: #3b82f6; border-color: #3b82f6; }
.disp-btn[data-color="#10b981"].selected { background: #10b981; border-color: #10b981; }
.disp-btn[data-color="#06b6d4"].selected { background: #06b6d4; border-color: #06b6d4; }
.disp-btn[data-color="#ef4444"].selected { background: #ef4444; border-color: #ef4444; }
.disp-btn[data-color="#dc2626"].selected { background: #dc2626; border-color: #dc2626; }
.disp-btn[data-color="#16a34a"].selected { background: #16a34a; border-color: #16a34a; }

/* Notes textarea */
.notes-section { padding: 0 18px 18px; }
.notes-section textarea {
    width: 100%; padding: 12px; border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm); font-family: inherit; font-size: 14px;
    resize: none; height: 90px;
}
.notes-section textarea:focus { outline: none; border-color: var(--red); }

/* Script panel */
.script-panel {
    margin: 0 18px 18px;
    background: var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
}
.script-toggle {
    width: 100%; padding: 12px 16px; background: none; border: none;
    font-family: inherit; font-size: 14px; font-weight: 700; color: var(--gray-700);
    text-align: left; display: flex; justify-content: space-between; align-items: center;
}
.script-content { padding: 0 16px 14px; font-size: 13px; color: var(--gray-700); line-height: 1.7; display: none; }
.script-content.open { display: block; }

/* Fixed save bar */
.save-bar {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 12px 18px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 100;
}
.save-bar .save-btn {
    width: 100%; padding: 16px; background: var(--red); color: white;
    border: none; border-radius: var(--radius); font-size: 16px; font-weight: 800;
    font-family: inherit;
}
.save-bar .save-btn:disabled { background: var(--gray-300); }

/* Followup card */
.followup-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}
.followup-card .fc-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.followup-card .fc-info .fc-name { font-size: 16px; font-weight: 700; }
.followup-card .fc-info .fc-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.followup-card .fc-time { margin-left: auto; text-align: right; }
.followup-card .fc-time .time { font-size: 14px; font-weight: 700; }
.followup-card .fc-time .overdue { font-size: 11px; color: var(--red); font-weight: 700; }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 500;
    align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
    background: white; border-radius: 20px 20px 0 0;
    padding: 24px 20px 32px;
    width: 100%; max-width: 480px;
    animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 18px; }
.modal-sheet .modal-btn {
    width: 100%; padding: 15px; border-radius: var(--radius);
    font-size: 15px; font-weight: 800; border: none; margin-top: 10px; font-family: inherit;
}
.modal-btn.confirm { background: var(--red); color: white; }
.modal-btn.cancel  { background: var(--gray-100); color: var(--gray-700); }

/* WhatsApp buttons */
.wa-buttons { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 18px; }
.wa-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; background: #dcfce7; border-radius: var(--radius-sm);
    border: none; font-family: inherit; font-size: 14px; font-weight: 700; color: #15803d;
}
.wa-btn .wa-icon { font-size: 18px; }
.wa-btn:active { background: #bbf7d0; }

/* Admin/Manager nav page headings */
.page-heading { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-heading h2 { font-size: 22px; font-weight: 800; }

/* Search bar */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-bar input, .search-bar select {
    padding: 9px 14px; border: 2px solid var(--gray-300); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit;
}
.search-bar input:focus, .search-bar select:focus { outline: none; border-color: var(--red); }
.search-bar input.main { flex: 1; min-width: 200px; }

/* Progress bar */
.progress-bar-wrap { background: var(--gray-100); border-radius: 20px; height: 8px; overflow: hidden; margin-top: 4px; }
.progress-bar-fill { height: 100%; background: var(--red); border-radius: 20px; }

/* Empty state */
.empty-state { text-align: center; padding: 50px 20px; color: var(--gray-500); }
.empty-state .emoji { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ============================================================
   MOBILE RESPONSIVE — Hamburger sidebar for admin/manager
   ============================================================ */

/* Hamburger button — hidden on desktop */
.hamburger-btn {
    display: none;
    background: var(--black);
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    border-radius: 8px;
}
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Sidebar overlay — dark backdrop on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}
.sidebar-overlay.open { display: block; }

/* Mobile logout button in topbar */
.topbar-logout {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--gray-100);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--red);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}

@media (max-width: 900px) {
    /* Sidebar slides in from left */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 200;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content { margin-left: 0; }

    /* Show hamburger and mobile logout */
    .hamburger-btn { display: flex; }
    .topbar-logout { display: flex; }

    /* Hide Change Password text on small screens — keep icon only */
    .pw-btn-text { display: none; }
}

@media (max-width: 700px) {
    .form-row { grid-template-columns: 1fr; }
    .form-row.three { grid-template-columns: 1fr 1fr; }
    .page-body { padding: 14px; }
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-title { font-size: 15px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* Tables scroll horizontally */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Cards full width */
    .card { border-radius: 10px; }

    /* Hide Change Password button on very small screens */
    #pwBtn { display: none; }
}
