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

:root {
    --color-primary:        #CC0000;
    --color-primary-dark:   #aa0000;
    --color-sidebar-bg:     #1a1f2e;
    --color-sidebar-hover:  rgba(255,255,255,.06);
    --color-sidebar-border: rgba(255,255,255,.07);
    --color-bg:             #f0f2f5;
    --color-surface:        #ffffff;
    --color-border:         #e2e6ea;
    --color-text:           #1a1f2e;
    --color-text-muted:     #6b7280;
    --color-text-light:     #9ca3af;
    --color-success:        #16a34a;
    --color-success-bg:     #f0fdf4;
    --color-danger:         #dc2626;
    --color-danger-bg:      #fef2f2;
    --color-warning:        #d97706;
    --color-warning-bg:     #fffbeb;
    --sidebar-width:        230px;
    --header-height:        56px;
    --radius:               6px;
    --radius-lg:            10px;
    --shadow-sm:            0 1px 3px rgba(0,0,0,.08);
    --shadow:               0 2px 8px rgba(0,0,0,.1);
    --font:                 'Inter', system-ui, -apple-system, sans-serif;
}

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

html { font-size: 14px; }
body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 99px; }

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}
.sidebar-overlay.is-open { display: block; }

/* ══════════════════════════════════════
   SIDEBAR
══════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform .25s ease;
}

.sidebar__brand {
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-sidebar-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.sidebar__brand-inner { display: flex; align-items: center; gap: 10px; }
.sidebar__brand img { height: 26px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
.sidebar__brand-text { display: flex; flex-direction: column; }
.sidebar__brand-name { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9); line-height: 1.3; }
.sidebar__brand-sub  { font-size: 10px; color: rgba(255,255,255,.35); letter-spacing: 0.3px; }

.sidebar__close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.sidebar__nav { flex: 1; padding: 8px 0; display: flex; flex-direction: column; }
.sidebar__section { padding: 14px 18px 4px; }
.sidebar__section-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,.25); }

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px;
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: background .12s, color .12s;
    position: relative;
}

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

.nav-item--active {
    background: var(--color-sidebar-hover);
    color: #fff;
    font-weight: 500;
}

.nav-item--active::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 3px;
    background: var(--color-primary);
    border-radius: 0 3px 3px 0;
}

.nav-item__icon { width: 16px; height: 16px; flex-shrink: 0; opacity: .65; display: flex; align-items: center; justify-content: center; }
.nav-item__icon svg { width: 16px; height: 16px; display: block; }
.nav-item--active .nav-item__icon { opacity: 1; }

.sidebar__footer { padding: 12px 18px; border-top: 1px solid var(--color-sidebar-border); flex-shrink: 0; }
.sidebar__user { display: flex; align-items: center; gap: 9px; }

.sidebar__avatar {
    width: 30px; height: 30px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__user-name { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-role { font-size: 11px; color: rgba(255,255,255,.35); }

.sidebar__logout { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 0; font-size: 12px; color: rgba(255,255,255,.3); text-decoration: none; transition: color .12s; }
.sidebar__logout:hover { color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════
   MAIN
══════════════════════════════════════ */
.main { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--header-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

.topbar__left { display: flex; align-items: center; gap: 12px; }

.topbar__menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--color-text-muted);
    border-radius: var(--radius);
    transition: background .12s;
}

.topbar__menu-btn:hover { background: var(--color-bg); }
.topbar__title { font-size: 15px; font-weight: 600; }
.topbar__date  { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

.main__content { padding: 24px; }

/* ══════════════════════════════════════
   LOGIN
══════════════════════════════════════ */
.body--login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--color-sidebar-bg);
    padding: 16px;
}

.login-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 380px; }
.login-logo { margin-bottom: 24px; }
.login-logo img { height: 40px; width: auto; filter: brightness(0) invert(1); }

.login-box {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.login-box__title    { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-box__subtitle { color: var(--color-text-muted); font-size: 12.5px; margin-bottom: 22px; }
.login-footer        { margin-top: 18px; font-size: 11px; color: rgba(255,255,255,.2); text-align: center; }

/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group label { font-size: 12px; font-weight: 500; }

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 11px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font);
    width: 100%;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(204,0,0,.08);
}

.form-group input:disabled { background: #f9fafb; color: var(--color-text-muted); cursor: not-allowed; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-hint { font-size: 11px; color: var(--color-text-muted); }

.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }

.form-section { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--color-border); }
.form-section:last-child { border-bottom: none; margin-bottom: 0; }
.form-section__title { font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px; }

.checkbox-group { display: flex; align-items: center; gap: 7px; padding: 6px 0; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; flex-shrink: 0; }
.checkbox-group label { font-size: 13px; cursor: pointer; margin: 0; }

.multi-select { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.multi-select__search { width: 100%; padding: 8px 11px; border: none; border-bottom: 1px solid var(--color-border); font-size: 13px; font-family: var(--font); background: #fafafa; }
.multi-select__search:focus { outline: none; }
.multi-select__list { max-height: 160px; overflow-y: auto; }
.multi-select__item { display: flex; align-items: center; gap: 7px; padding: 8px 11px; cursor: pointer; font-size: 13px; }
.multi-select__item:hover { background: #f9fafb; }
.multi-select__item input { width: 15px; height: 15px; accent-color: var(--color-primary); flex-shrink: 0; }

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.btn--primary   { background: var(--color-primary); color: #fff; }
.btn--primary:hover   { background: var(--color-primary-dark); }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn--secondary:hover { background: #f9fafb; }
.btn--danger    { background: var(--color-danger); color: #fff; }
.btn--danger:hover    { background: #b91c1c; }
.btn--ghost     { background: transparent; color: var(--color-text-muted); }
.btn--ghost:hover     { background: var(--color-bg); color: var(--color-text); }
.btn--sm   { padding: 6px 10px; font-size: 12px; }
.btn--lg   { padding: 10px 18px; font-size: 14px; }
.btn--full { width: 100%; }

/* ══════════════════════════════════════
   ALERTS
══════════════════════════════════════ */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 12.5px; border: 1px solid transparent; }
.alert--error   { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: #fecaca; }
.alert--success { background: var(--color-success-bg); color: var(--color-success); border-color: #bbf7d0; }
.alert--warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: #fde68a; }

/* ══════════════════════════════════════
   TOOLBAR + TABLE
══════════════════════════════════════ */
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; flex-wrap: wrap; }
.toolbar__left, .toolbar__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.search-input {
    padding: 7px 12px 7px 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 12.5px;
    width: 200px;
    background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
}

.search-input:focus { outline: none; border-color: var(--color-primary); }

.table-wrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 500px; }
.table th { background: #fafbfc; padding: 9px 14px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--color-border); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbfc; }
.table__empty { text-align: center; color: var(--color-text-muted); padding: 40px; font-size: 13px; }

.mobile-list { display: none; }
.mobile-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.mobile-card__title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.mobile-card__meta  { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mobile-card__actions { display: flex; gap: 8px; margin-top: 10px; border-top: 1px solid var(--color-border); padding-top: 10px; }

/* ══════════════════════════════════════
   BADGES & STATUS
══════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge--red    { background: #fef2f2; color: var(--color-primary); }
.badge--blue   { background: #eff6ff; color: #1d4ed8; }
.badge--green  { background: #f0fdf4; color: #15803d; }
.badge--yellow { background: #fefce8; color: #854d0e; }
.badge--gray   { background: #f3f4f6; color: #4b5563; }
.badge--purple { background: #faf5ff; color: #7e22ce; }

.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.status--active::before   { background: var(--color-success); }
.status--inactive::before { background: var(--color-text-light); }
.status--pending::before  { background: var(--color-warning); }

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.card--sm { padding: 16px; }
.card__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--color-border); gap: 8px; }
.card__title    { font-size: 13.5px; font-weight: 600; }
.card__subtitle { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.form-actions { display: flex; gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--color-border); flex-wrap: wrap; }

/* ══════════════════════════════════════
   STATS
══════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--color-primary); }
.stat-card__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); margin-bottom: 6px; }
.stat-card__value { font-size: 26px; font-weight: 700; line-height: 1; }

/* ══════════════════════════════════════
   PERMISSIONS
══════════════════════════════════════ */
.permission-table { width: 100%; border-collapse: collapse; }
.permission-table th { font-size: 11px; font-weight: 600; color: var(--color-text-muted); padding: 7px 12px; text-align: center; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid var(--color-border); }
.permission-table th:first-child { text-align: left; }
.permission-table td { padding: 9px 12px; border-bottom: 1px solid var(--color-border); text-align: center; }
.permission-table td:first-child { text-align: left; font-weight: 500; font-size: 13px; }
.permission-table tr:last-child td { border-bottom: none; }
.permission-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--color-primary); cursor: pointer; }

/* ══════════════════════════════════════
   ROLE BADGES
══════════════════════════════════════ */
.role-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 500; }
.role-badge--gm   { background: #1a1a2e; color: #fff; }
.role-badge--hoo  { background: #7f1d1d; color: #fff; }
.role-badge--am   { background: #fef2f2; color: var(--color-primary); }
.role-badge--cnm  { background: #eff6ff; color: #1d4ed8; }
.role-badge--sm   { background: #f0fdf4; color: #15803d; }
.role-badge--sv   { background: #faf5ff; color: #7e22ce; }
.role-badge--srsa { background: #fefce8; color: #854d0e; }
.role-badge--rsa  { background: #f3f4f6; color: #4b5563; }

/* ══════════════════════════════════════
   TABS
══════════════════════════════════════ */
.tabs { display: flex; border-bottom: 1px solid var(--color-border); margin-bottom: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { padding: 8px 14px; font-size: 13px; font-weight: 500; color: var(--color-text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--color-text); }
.tab--active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ══════════════════════════════════════
   MAP
══════════════════════════════════════ */
.map-preview { width: 100%; height: 180px; border-radius: var(--radius); border: 1px solid var(--color-border); overflow: hidden; }
.map-preview iframe { width: 100%; height: 100%; border: none; }
.coords-display { font-family: monospace; font-size: 11.5px; color: var(--color-text-muted); background: #f9fafb; padding: 5px 9px; border-radius: 4px; border: 1px solid var(--color-border); margin-top: 6px; }

/* ══════════════════════════════════════
   APPROVAL BANNER
══════════════════════════════════════ */
.approval-banner { background: var(--color-warning-bg); border: 1px solid #fde68a; border-radius: var(--radius); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--color-warning); margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }

/* ══════════════════════════════════════
   PAGE GRID
══════════════════════════════════════ */
.page-grid      { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.page-grid--632 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }

/* ══════════════════════════════════════
   BOTTOM NAV
══════════════════════════════════════ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-sidebar-bg);
    border-top: 1px solid var(--color-sidebar-border);
    z-index: 90;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav__items { display: flex; justify-content: space-around; align-items: center; }

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    text-decoration: none;
    color: rgba(255,255,255,.4);
    font-size: 10px;
    font-weight: 500;
    min-width: 56px;
    border-radius: var(--radius);
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav__item svg { width: 20px; height: 20px; }
.bottom-nav__item--active { color: var(--color-primary); }

/* ══════════════════════════════════════
   DASHBOARD WELCOME
══════════════════════════════════════ */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--color-sidebar-bg) 0%, #2d3650 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    color: #fff;
}

.dashboard-welcome__name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.dashboard-welcome__date { font-size: 13px; color: rgba(255,255,255,.5); }

/* ══════════════════════════════════════
   MODULE GRID
══════════════════════════════════════ */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.module-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    transition: all .18s;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform .18s;
}

.module-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.module-card:hover::before { transform: scaleX(1); }

.module-card__icon {
    width: 60px; height: 60px;
    background: #fef2f2;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.module-card__icon svg { width: 30px; height: 30px; }
.module-card__label { font-size: 14px; font-weight: 600; }
.module-card__arrow { font-size: 16px; color: var(--color-text-muted); margin-top: 4px; }

/* ══════════════════════════════════════
   MODULE PLACEHOLDER
══════════════════════════════════════ */
.module-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    min-height: 300px;
}

.module-placeholder__icon { color: var(--color-primary); opacity: .35; margin-bottom: 16px; }
.module-placeholder__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.module-placeholder__text  { font-size: 13px; color: var(--color-text-muted); }

/* ══════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════ */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state__title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty-state__text  { font-size: 13px; color: var(--color-text-muted); }

/* ══════════════════════════════════════
   RESPONSIVE — TABLET
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .page-grid--632 { grid-template-columns: 1fr; }
    .form-grid-3    { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.is-open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.3); }
    .sidebar__close { display: block; }

    .main { margin-left: 0; padding-bottom: 70px; }
    .topbar { padding: 0 16px; }
    .topbar__menu-btn { display: flex; }
    .main__content { padding: 16px; }

    .bottom-nav { display: block; }

    .page-grid,
    .page-grid--632,
    .form-grid,
    .form-grid-3 { grid-template-columns: 1fr; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card__value { font-size: 22px; }

    .table-wrap { display: none; }
    .mobile-list { display: block; }

    .search-input { width: 100%; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar__left, .toolbar__right { width: 100%; }
    .toolbar__right .btn { width: 100%; }

    .card { padding: 16px; }
    .card--sm { padding: 14px; }

    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }

    .dashboard-welcome { padding: 18px 20px; }
    .dashboard-welcome__name { font-size: 17px; }
    .module-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .module-card { padding: 20px 14px; }
}

@media (max-width: 400px) {
    .stats-grid  { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: 1fr; }
}
