/* ── AttendanceIQ Design System ───────────────────────────────────────────── */

:root {
    --bg:         #0f1117;
    --bg-2:       #161820;
    --bg-3:       #1e2030;
    --border:     #2a2d3e;
    --text:       #e2e4f0;
    --text-2:     #8b90a8;
    --text-3:     #5a5f7a;
    --accent:     #6c63ff;
    --accent-2:   #8b5cf6;
    --green:      #10b981;
    --yellow:     #f59e0b;
    --red:        #ef4444;
    --blue:       #3b82f6;
    --cyan:       #06b6d4;
    --radius:     12px;
    --radius-sm:  8px;
    --sidebar-w:  240px;
    --header-h:   60px;
    --shadow:     0 4px 24px rgba(0,0,0,0.4);
    --font:       'Plus Jakarta Sans', sans-serif;
    --mono:       'JetBrains Mono', monospace;
    --transition: 0.2s ease;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer .user-info { display: none; }

.sidebar-brand {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-bottom: 1px solid var(--border);
    min-height: var(--header-h);
}

.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.brand-name { font-weight: 800; font-size: 15px; line-height: 1.2; }
.brand-role  { font-size: 11px; color: var(--text-3); font-weight: 500; }

.sidebar-nav { flex: 1; padding: .5rem; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-item i { width: 18px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--accent)18; color: var(--accent); }
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
    width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}

.badge-pill {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.sidebar-footer {
    padding: .75rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.user-card { display: flex; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.user-avatar {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}

.user-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-team { font-size: 11px; color: var(--text-3); }

.logout-btn {
    background: transparent; border: none; color: var(--text-3);
    cursor: pointer; padding: .4rem; border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.logout-btn:hover { background: var(--red)20; color: var(--red); }

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin var(--transition);
}

.sidebar.collapsed ~ .main-content { margin-left: 64px; }

.top-bar {
    height: var(--header-h);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-toggle {
    background: none; border: none; color: var(--text-2);
    cursor: pointer; font-size: 16px; padding: .25rem;
}

.top-bar-title { font-weight: 700; font-size: 16px; flex: 1; }
.live-time { font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 500; }

.page-body { padding: 1.5rem; max-width: 1400px; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: 13.5px;
    position: relative;
}

.alert-success { background: var(--green)18; border: 1px solid var(--green)40; color: var(--green); }
.alert-danger   { background: var(--red)18;   border: 1px solid var(--red)40;   color: var(--red); }
.alert-info     { background: var(--blue)18;  border: 1px solid var(--blue)40;  color: var(--blue); }
.alert-close    { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; font-size: 18px; line-height: 1; }

/* ── Panel ───────────────────────────────────────────────────────────────── */
.panel {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
}

.panel-title { font-weight: 700; font-size: 15px; }
.panel-link  { font-size: 12px; color: var(--accent); font-weight: 600; }

/* ── User Dashboard ──────────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 1.25rem;
}

.checkin-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.checkin-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: var(--accent)08;
}

.checkin-card.checked-in   { border-color: var(--green)50; }
.checkin-card.checked-out  { border-color: var(--text-3)50; }

.checkin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.checkin-date   { font-size: 20px; font-weight: 800; margin-bottom: .25rem; }
.checkin-subtitle { color: var(--text-2); font-size: 14px; }

.status-ring {
    width: 56px; height: 56px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: var(--text-3);
    transition: all .3s;
}
.status-ring.active { border-color: var(--green); color: var(--green); box-shadow: 0 0 20px var(--green)30; }

.late-badge {
    display: inline-block;
    background: var(--yellow)20; color: var(--yellow);
    font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px; margin-left: 6px;
    vertical-align: middle;
}

.time-warning {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 1rem;
    background: var(--red)15; border: 1px solid var(--red)30; color: var(--red);
}
.time-warning.warning { background: var(--yellow)15; border-color: var(--yellow)30; color: var(--yellow); }

.reason-box { margin-bottom: 1rem; }
.reason-box label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.reason-box textarea {
    width: 100%;
    background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
    border-radius: var(--radius-sm); padding: .75rem; font-family: var(--font); font-size: 13px;
    resize: vertical;
}
.reason-box textarea:focus { outline: none; border-color: var(--accent); }

.btn-checkin {
    width: 100%; padding: .9rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 15px; cursor: pointer;
    transition: all var(--transition);
    display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-checkin:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent)40; }

.btn-checkout {
    width: 100%; padding: .9rem;
    background: transparent;
    border: 2px solid var(--green); color: var(--green);
    border-radius: var(--radius-sm); font-weight: 700; font-size: 15px;
    cursor: pointer; transition: all var(--transition);
}
.btn-checkout:hover { background: var(--green)15; }

.working-since { color: var(--text-2); font-size: 13px; margin-bottom: .75rem; }
.elapsed       { color: var(--accent); font-family: var(--mono); margin-left: .5rem; }

.worked-info {
    display: flex; gap: 1.5rem; flex-wrap: wrap;
    font-size: 13px; color: var(--text-2);
}
.worked-info i { margin-right: .3rem; }

.reason-status {
    margin-top: .75rem;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
}
.reason-pending  { background: var(--yellow)15; color: var(--yellow); }
.reason-approved { background: var(--green)15;  color: var(--green); }
.reason-rejected { background: var(--red)15;    color: var(--red); }

/* ── Stats Panel ─────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.stat-box {
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-number { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.stat-label  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }

.stat-present { background: var(--green)15; color: var(--green); }
.stat-late    { background: var(--yellow)15; color: var(--yellow); }
.stat-absent  { background: var(--red)15;   color: var(--red); }
.stat-holiday { background: var(--blue)15;  color: var(--blue); }

/* ── Recent Attendance ───────────────────────────────────────────────────── */
.attendance-list { display: flex; flex-direction: column; gap: .4rem; }

.att-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-3);
    transition: background var(--transition);
}
.att-row:hover { background: var(--bg-3); }

.att-date { text-align: center; min-width: 36px; }
.att-day  { display: block; font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; }
.att-num  { display: block; font-size: 16px; font-weight: 800; }

.att-details { flex: 1; display: flex; gap: 1rem; font-size: 12px; color: var(--text-2); }
.view-all-link { display: block; text-align: center; margin-top: .75rem; font-size: 12px; font-weight: 600; }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .04em;
}
.status-success   { background: var(--green)20;  color: var(--green); }
.status-warning   { background: var(--yellow)20; color: var(--yellow); }
.status-danger    { background: var(--red)20;    color: var(--red); }
.status-info      { background: var(--blue)20;   color: var(--blue); }
.status-secondary { background: var(--text-3)20; color: var(--text-2); }

/* ── Admin Dashboard ─────────────────────────────────────────────────────── */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.kpi-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: .75rem;
}

.kpi-icon  { font-size: 22px; }
.kpi-num   { font-size: 26px; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 11px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.kpi-label a { color: inherit; }

.kpi-total   .kpi-icon { color: var(--accent); }
.kpi-present .kpi-icon { color: var(--green); }
.kpi-late    .kpi-icon { color: var(--yellow); }
.kpi-absent  .kpi-icon { color: var(--red); }
.kpi-checkout .kpi-icon { color: var(--cyan); }
.kpi-pending .kpi-icon  { color: var(--yellow); }
.kpi-pending { border-color: var(--yellow)40; }

.holiday-banner {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem; margin-bottom: 1.25rem;
    background: var(--cyan)10; border: 1px solid var(--cyan)30; color: var(--cyan);
    border-radius: var(--radius);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.panel-wide { grid-column: 1 / -1; }

/* Monthly bars */
.bar-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.bar-label { width: 60px; font-size: 12px; color: var(--text-2); font-weight: 500; }
.bar-track { flex: 1; height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 4px; transition: width .8s ease; }
.bar-green  { background: var(--green); }
.bar-yellow { background: var(--yellow); }
.bar-red    { background: var(--red); }
.bar-val    { width: 30px; text-align: right; font-size: 13px; font-weight: 700; }

/* Team rows */
.teams-list { display: flex; flex-direction: column; gap: .5rem; }
.team-row   { display: flex; align-items: center; gap: .75rem; padding: .5rem; border-radius: var(--radius-sm); }
.team-row:hover { background: var(--bg-3); }
.team-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.team-name  { flex: 1; font-size: 13px; font-weight: 500; }
.mini-bar   { width: 80px; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.mini-fill  { height: 100%; border-radius: 3px; }
.team-count { font-size: 12px; color: var(--text-2); font-family: var(--mono); min-width: 40px; text-align: right; }
.team-tag   { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }

/* Employee cell */
.emp-cell { display: flex; align-items: center; gap: .5rem; }
.emp-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table th {
    text-align: left;
    padding: .6rem .75rem;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border)80;
    vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-3)50; }
.data-table tr:last-child td { border-bottom: none; }
.row-deleted td { opacity: .5; }
.empty-state { text-align: center; color: var(--text-3); padding: 2rem; font-size: 13px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary, .btn-secondary {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600; font-size: 13.5px;
    cursor: pointer; border: none;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-secondary { background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text); }

.btn-sm {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .6rem; font-size: 12px;
    border-radius: var(--radius-sm); border: none;
    cursor: pointer; font-weight: 600; transition: all var(--transition);
}
.btn-edit    { background: var(--blue)20;   color: var(--blue);  }
.btn-delete  { background: var(--red)20;    color: var(--red);   }
.btn-restore { background: var(--green)20;  color: var(--green); }
.btn-danger  { background: var(--red);      color: #fff;         }
.btn-edit:hover    { background: var(--blue)35; }
.btn-delete:hover  { background: var(--red)35; }
.btn-restore:hover { background: var(--green)35; }

.toggle-btn {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .3rem .7rem; font-size: 11px; font-weight: 700;
    border-radius: 20px; border: none; cursor: pointer;
    transition: all var(--transition);
}
.toggle-on  { background: var(--green)20; color: var(--green); }
.toggle-off { background: var(--text-3)20; color: var(--text-3); }
.toggle-on:hover  { background: var(--green)35; }
.toggle-off:hover { background: var(--text-3)35; }

.count-badge {
    display: inline-block;
    background: var(--bg-3); border: 1px solid var(--border);
    color: var(--text-2); font-size: 12px; font-weight: 600;
    padding: 2px 8px; border-radius: 4px;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.form-group input,
.form-group select,
.form-group textarea,
.compact-form input,
.compact-form select,
.compact-form textarea {
    width: 100%;
    background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
    border-radius: var(--radius-sm); padding: .6rem .75rem;
    font-family: var(--font); font-size: 13.5px;
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.compact-form input:focus,
.compact-form select:focus { outline: none; border-color: var(--accent); }

.form-row   { margin-bottom: .75rem; }
.form-row label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .05em; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.form-row-2 label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: .3rem; text-transform: uppercase; }
.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }

.field-error { color: var(--red); font-size: 11px; display: block; margin-top: .25rem; }
.required    { color: var(--red); }

.color-picker-row { display: flex; gap: .75rem; align-items: center; }
.color-picker-row input[type="color"] {
    width: 44px; height: 38px; padding: 2px; cursor: pointer;
    background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.color-picker-row input[type="text"] { flex: 1; }

.switch-label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.switch-label input { display: none; }
.switch-track {
    width: 40px; height: 22px; background: var(--bg-3); border: 1px solid var(--border);
    border-radius: 11px; position: relative; transition: background var(--transition);
}
.switch-track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 14px; height: 14px; background: var(--text-3);
    border-radius: 50%; transition: all var(--transition);
}
.switch-label input:checked ~ .switch-track { background: var(--accent); border-color: var(--accent); }
.switch-label input:checked ~ .switch-track::after { transform: translateX(18px); background: #fff; }

/* ── Teams / Holidays list ───────────────────────────────────────────────── */
.team-name-cell { display: flex; align-items: center; gap: .5rem; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.two-col-layout { display: grid; grid-template-columns: 320px 1fr; gap: 1.25rem; align-items: start; }
.panel-tall { max-height: 80vh; overflow-y: auto; }

.holidays-list { display: flex; flex-direction: column; gap: .5rem; }
.holiday-item  {
    display: flex; align-items: center; gap: 1rem;
    padding: .75rem; border-radius: var(--radius-sm);
    background: var(--bg-3);
    transition: opacity var(--transition);
}
.holiday-disabled { opacity: .45; }
.holiday-date-block { text-align: center; min-width: 44px; }
.hol-month { display: block; font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; }
.hol-day   { display: block; font-size: 22px; font-weight: 800; line-height: 1; }
.hol-year  { display: block; font-size: 10px; color: var(--text-3); }
.holiday-body { flex: 1; }
.holiday-name { font-weight: 600; font-size: 13.5px; }
.holiday-desc { font-size: 12px; color: var(--text-3); }
.holiday-meta { font-size: 11px; color: var(--text-3); }
.holiday-controls { display: flex; gap: .4rem; align-items: center; }
.toggle-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.toggle-badge.active   { background: var(--green)20; color: var(--green); }
.toggle-badge.inactive { background: var(--text-3)20; color: var(--text-3); }

/* Holiday dashboard rows */
.holiday-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem .5rem; border-bottom: 1px solid var(--border)50;
}
.holiday-row:last-child { border-bottom: none; }
.holiday-date { font-family: var(--mono); font-size: 12px; color: var(--accent); min-width: 44px; }
.holiday-info { flex: 1; }
.holiday-name { font-weight: 600; font-size: 13px; }
.holiday-desc { font-size: 11px; color: var(--text-3); }

/* ── Pending Reasons ─────────────────────────────────────────────────────── */
.reason-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--bg-3);
}
.reason-late    { border-left: 3px solid var(--yellow); }
.reason-nextday { border-left: 3px solid var(--red); }
.reason-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; }
.emp-info  { display: flex; align-items: center; gap: .75rem; }
.emp-name  { font-weight: 700; font-size: 14px; }
.emp-team  { font-size: 11px; color: var(--text-3); }
.reason-meta { text-align: right; display: flex; flex-direction: column; gap: .3rem; }
.reason-date  { font-size: 12px; color: var(--text-2); font-family: var(--mono); }
.check-time   { font-size: 11px; color: var(--text-3); }
.badge-late    { background: var(--yellow)20; color: var(--yellow); }
.badge-nextday { background: var(--red)20;    color: var(--red); }
.reason-type-badge {
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    border-radius: 4px; display: inline-block;
}
.reason-text {
    background: var(--bg-2); padding: .75rem 1rem;
    border-radius: var(--radius-sm); font-size: 13.5px;
    color: var(--text); margin-bottom: 1rem;
    border-left: 2px solid var(--border);
}
.reason-text .fa-quote-left { color: var(--text-3); margin-right: .4rem; }
.review-form { display: flex; gap: .75rem; align-items: center; }
.review-form input { flex: 1; }
.review-actions { display: flex; gap: .5rem; }
.btn-approve {
    padding: .5rem 1rem; background: var(--green)20; color: var(--green);
    border: 1px solid var(--green)40; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; gap: .3rem; white-space: nowrap;
    transition: all var(--transition);
}
.btn-approve:hover { background: var(--green)35; }
.btn-reject {
    padding: .5rem 1rem; background: var(--red)20; color: var(--red);
    border: 1px solid var(--red)40; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; gap: .3rem; white-space: nowrap;
    transition: all var(--transition);
}
.btn-reject:hover { background: var(--red)35; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem;
}
.page-header h2 { font-size: 18px; font-weight: 800; }
.actions-cell   { white-space: nowrap; }

/* ── Form page ───────────────────────────────────────────────────────────── */
.form-page { max-width: 520px; }
.form-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: var(--bg);
    margin: 0;
}
.login-card {
    width: 100%; max-width: 400px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2.5rem;
    box-shadow: var(--shadow);
}
.login-brand { text-align: center; margin-bottom: 2rem; }
.login-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 14px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.login-brand h1 { font-size: 22px; font-weight: 800; margin-bottom: .25rem; }
.login-brand p  { color: var(--text-3); font-size: 13px; }
.remember-me    { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--text-2); margin-bottom: 1rem; cursor: pointer; }
.btn-login {
    width: 100%; padding: .85rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 15px; cursor: pointer;
    transition: all var(--transition);
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent)40; }

/* ── Compact form ─────────────────────────────────────────────────────────── */
.compact-form .form-row { margin-bottom: .6rem; }
.compact-form .form-row label { font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: .3rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .admin-grid     { grid-template-columns: 1fr; }
    .panel-wide     { grid-column: auto; }
    .two-col-layout { grid-template-columns: 1fr; }
    .kpi-strip      { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .sidebar        { transform: translateX(-100%); }
    .main-content   { margin-left: 0; }
    .sidebar.open   { transform: translateX(0); }
    .kpi-strip      { grid-template-columns: 1fr 1fr; }
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; margin-top: 1rem; justify-content: center; }
.pagination li a, .pagination li span {
    display: inline-block; padding: .35rem .65rem;
    border-radius: var(--radius-sm); font-size: 13px;
    background: var(--bg-3); color: var(--text-2);
    border: 1px solid var(--border);
}
.pagination li.active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination li a:hover { background: var(--bg-2); color: var(--text); }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Text utilities ──────────────────────────────────────────────────────── */
.text-muted { color: var(--text-3); }
.mb-0       { margin-bottom: 0; }

/* ── Checkout Feedback (admin view) ──────────────────────────────────────── */
.mood-emoji-display { font-size:18px; cursor:default; }
.feedback-note {
    font-size:11px; color:var(--text-3); font-style:italic;
    max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

/* ── Settings page ───────────────────────────────────────────────────────── */
.setting-group-toggle { background:var(--bg-3); border-radius:var(--radius-sm); padding:1rem; margin:1rem 0; border-bottom:none; }
