/* ===================== MR JAY ADMIN — Poster Edition ===================== */

:root {
    /* Brand — matches landing page */
    --yellow: #FFE600;
    --yellow-2: #FFD000;
    --yellow-soft: rgba(255, 230, 0, 0.10);
    --yellow-line: rgba(255, 230, 0, 0.16);

    --black: #000000;
    --black-1: #050505;
    --black-2: #0d0d0d;
    --black-3: #161616;
    --black-4: #1f1f1f;
    --black-5: #2a2a2a;

    --text: #f3f3f3;
    --text-dim: #9a9a9a;
    --text-mute: #6a6a6a;
    --line: rgba(255, 255, 255, 0.06);

    --green: #2ecc71;
    --red: #e74c3c;
    --blue: #3498db;
    --orange: #f39c12;

    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-y: 0 8px 28px rgba(255, 230, 0, 0.18);

    --r: 0px;             /* sharp poster corners; use 4px on inputs */
    --side-w: 232px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--black);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.5;
}
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--yellow); text-decoration: none; transition: 0.15s; }
a:hover { color: var(--text); }

/* Display fonts */
.display, .display-font { font-family: 'Anton', 'Impact', sans-serif; letter-spacing: 0.02em; }

/* ────────────────────────────────────────────
   LOGIN
─────────────────────────────────────────────*/
.login-body {
    display: flex; align-items: center; justify-content: center;
    padding: 30px 20px; min-height: 100vh; position: relative;
}
.login-bg {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 75% 40%, rgba(255, 230, 0, 0.10), transparent 55%),
        radial-gradient(ellipse at 20% 90%, rgba(255, 230, 0, 0.05), transparent 50%),
        repeating-linear-gradient(45deg, transparent 0 60px, rgba(255, 230, 0, 0.015) 60px 61px),
        var(--black);
}
.login-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px;
    background: var(--black-3);
    border: 1px solid var(--yellow-line);
    padding: 38px 32px;
    box-shadow: var(--shadow);
}
.login-card::before, .login-card::after {
    content: ''; position: absolute;
    width: 14px; height: 14px;
    background: var(--yellow);
}
.login-card::before { top: -7px; left: -7px; }
.login-card::after { bottom: -7px; right: -7px; }

.login-logo {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 2rem;
    color: var(--yellow);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.login-logo span {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
}
.login-sub { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 26px; }
.back-link {
    display: block; text-align: center; margin-top: 22px;
    color: var(--text-dim); font-size: 0.82rem;
    letter-spacing: 1.5px; text-transform: uppercase;
}
.back-link:hover { color: var(--yellow); }

/* ────────────────────────────────────────────
   FORMS (shared)
─────────────────────────────────────────────*/
.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    color: var(--yellow);
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 400;
}
input, select, textarea {
    width: 100%;
    padding: 11px 13px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.92rem;
    transition: 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 230, 0, 0.03);
}
textarea { resize: vertical; min-height: 76px; }

/* ────────────────────────────────────────────
   BUTTONS
─────────────────────────────────────────────*/
.btn-submit, .btn-primary {
    width: 100%; padding: 13px 16px;
    background: var(--yellow);
    color: var(--black);
    border: 2px solid var(--yellow);
    font-family: 'Anton', 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.18s;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
}
.btn-submit:hover, .btn-primary:hover {
    background: transparent;
    color: var(--yellow);
}
.btn-submit:disabled, .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--black-5);
    padding: 9px 14px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.84rem;
    transition: 0.18s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-secondary svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-secondary:hover { border-color: var(--yellow); color: var(--yellow); }

.btn-danger {
    background: transparent; color: var(--red);
    border: 1px solid var(--red);
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.18s;
    font-family: inherit;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-danger svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-danger:hover { background: var(--red); color: white; }

.btn-icon {
    background: var(--black-4);
    color: var(--text);
    border: 1px solid var(--black-5);
    padding: 7px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: 0.15s;
    font-family: inherit;
}
.btn-icon:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-icon.gold,
.btn-icon.yellow {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
    font-family: 'Anton', sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.btn-icon.gold:hover,
.btn-icon.yellow:hover {
    background: transparent;
    color: var(--yellow);
}

.form-msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.86rem;
    text-align: center;
    display: none;
}
.form-msg.success { background: rgba(46, 204, 113, 0.10); color: var(--green); border: 1px solid var(--green); display: block; }
.form-msg.error { background: rgba(231, 76, 60, 0.10); color: var(--red); border: 1px solid var(--red); display: block; }

/* ────────────────────────────────────────────
   APP SHELL — sidebar + main
─────────────────────────────────────────────*/
.dash {
    display: grid;
    grid-template-columns: var(--side-w) 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: sticky; top: 0;
    height: 100vh;
    background: var(--black-1);
    border-right: 1px solid var(--line);
    padding: 22px 0 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.side-logo {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 1.5rem;
    color: var(--yellow);
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    padding: 0 22px 22px;
    border-bottom: 1px solid var(--line);
}
.side-logo span {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.66rem;
    font-weight: 500;
    color: var(--text-mute);
    letter-spacing: 3px;
    margin-top: 6px;
}

.side-nav {
    flex: 1;
    padding: 14px 12px;
    overflow-y: auto;
}
.side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    color: var(--text-dim);
    cursor: pointer;
    transition: 0.15s;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 2px;
    position: relative;
}
.side-link:hover {
    background: var(--black-3);
    color: var(--text);
}
.side-link.active {
    background: var(--yellow-soft);
    color: var(--yellow);
    font-weight: 600;
}
.side-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 8px; bottom: 8px;
    width: 3px;
    background: var(--yellow);
}
.side-link svg { flex-shrink: 0; opacity: 0.85; }
.side-link.active svg { opacity: 1; }

.side-foot {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
    background: var(--black-1);
}
.side-foot .user {
    font-size: 0.86rem;
    color: var(--text);
    margin-bottom: 2px;
    font-weight: 500;
}
.side-foot .role {
    font-size: 0.7rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}
.btn-logout {
    width: 100%;
    padding: 8px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--black-5);
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.15s;
    font-family: 'Anton', sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* Mobile sidebar backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 140;
    opacity: 0;
    transition: opacity 0.25s;
}
.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Main */
.main {
    padding: 24px 28px;
    min-width: 0; /* prevent grid blowout */
}

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.page-title {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 1.7rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.page-title .sub {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0;
    text-transform: none;
    margin-top: 6px;
}
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--black-5);
    color: var(--yellow);
    width: 38px; height: 38px;
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center; justify-content: center;
    flex-shrink: 0;
}
.menu-toggle:hover { border-color: var(--yellow); }

/* ────────────────────────────────────────────
   KPI CARDS
─────────────────────────────────────────────*/
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.kpi {
    background: var(--black-3);
    border: 1px solid var(--line);
    padding: 18px 20px;
    transition: 0.18s;
    position: relative;
    overflow: hidden;
}
.kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--yellow);
    opacity: 0.4;
    transition: opacity 0.18s;
}
.kpi:hover {
    border-color: var(--yellow-line);
    background: var(--black-4);
}
.kpi:hover::before { opacity: 1; }
.kpi-label {
    font-size: 0.7rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    margin-bottom: 10px;
}
.kpi-value {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--yellow);
    letter-spacing: 0.5px;
}
.kpi-foot {
    color: var(--text-dim);
    font-size: 0.74rem;
    margin-top: 8px;
}

/* ────────────────────────────────────────────
   QUICK ACTIONS
─────────────────────────────────────────────*/
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.qa-btn {
    background: var(--black-3);
    border: 1px solid var(--line);
    padding: 14px 16px;
    color: var(--text);
    text-decoration: none;
    display: flex; align-items: center; gap: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: 0.18s;
}
.qa-btn:hover {
    border-color: var(--yellow);
    background: var(--black-4);
    color: var(--yellow);
}
.qa-btn span {
    width: 26px; height: 26px;
    background: var(--yellow);
    color: var(--black);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ────────────────────────────────────────────
   PANELS / TABLES
─────────────────────────────────────────────*/
.panel {
    background: var(--black-3);
    border: 1px solid var(--line);
    padding: 0;
    margin-bottom: 18px;
    overflow: hidden;
}
.panel-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--black-2);
}
.panel-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    display: flex; align-items: center; gap: 10px;
}
.panel-title .panel-count {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: var(--text-mute);
    background: var(--black-4);
    padding: 2px 9px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

/* ────────────────────────────────────────────
   TOOLBAR (filters + actions row)
─────────────────────────────────────────────*/
.toolbar {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--black-3);
    flex-wrap: wrap;
    align-items: center;
}
.toolbar-search {
    position: relative;
    flex: 1;
    min-width: 220px;
}
.toolbar-search input {
    width: 100%;
    padding: 9px 36px 9px 36px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.88rem;
    transition: 0.15s;
}
.toolbar-search input:focus {
    outline: none;
    border-color: var(--yellow);
    background: rgba(255, 230, 0, 0.03);
}
.toolbar-search-icon {
    position: absolute;
    left: 11px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-mute);
    pointer-events: none;
    line-height: 0;
}
.toolbar-search-clear {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    background: var(--black-4);
    color: var(--text-dim);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    display: none;
    align-items: center; justify-content: center;
    transition: 0.15s;
}
.toolbar-search-clear:hover { background: var(--red); color: white; }
.toolbar-search.has-value .toolbar-search-clear { display: flex; }

.toolbar-filters {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-pill {
    padding: 7px 12px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text-dim);
    border-radius: 50px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.15s;
    font-family: inherit;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: nowrap;
}
.filter-pill:hover { border-color: var(--yellow); color: var(--text); }
.filter-pill.active {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--black);
    font-weight: 600;
}
.filter-pill .pill-count {
    margin-left: 4px;
    opacity: 0.7;
    font-size: 0.74rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--black-5);
    margin: 0 2px;
}

.toolbar-spacer { flex: 1; }

.toolbar input[type="date"] {
    padding: 8px 10px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: inherit;
    color-scheme: dark;
}
.toolbar input[type="date"]:focus { outline: none; border-color: var(--yellow); }

.search-input { /* legacy compat */
    padding: 8px 12px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text);
    border-radius: 4px;
    min-width: 200px;
    font-size: 0.86rem;
}
.search-input:focus { outline: none; border-color: var(--yellow); }
.filter-select {
    padding: 8px 10px;
    background: var(--black);
    border: 1px solid var(--black-5);
    color: var(--text);
    border-radius: 4px;
    font-size: 0.84rem;
    font-family: inherit;
    color-scheme: dark;
}
.filter-select:focus { outline: none; border-color: var(--yellow); }

/* Old panel-actions wrapper */
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ────────────────────────────────────────────
   TABLES
─────────────────────────────────────────────*/
.table-wrap {
    overflow-x: auto;
    margin: 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}
th, td {
    text-align: left;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 0.86rem;
    vertical-align: middle;
}
th {
    color: var(--text-mute);
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    background: var(--black-2);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    user-select: none;
}
tbody tr { transition: background 0.12s; }
tbody tr:hover td { background: rgba(255, 230, 0, 0.025); }
tbody tr:last-child td { border-bottom: none; }
tr.row-clickable { cursor: pointer; }

/* Cell helpers */
td strong { color: var(--text); font-weight: 600; }
.cell-yellow { color: var(--yellow); font-family: 'Anton', sans-serif; font-size: 0.95rem; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.cell-stack .cell-sub { color: var(--text-mute); font-size: 0.78rem; }
.cell-avatar {
    display: flex; align-items: center; gap: 10px;
}
.avatar {
    width: 34px; height: 34px;
    background: var(--yellow-soft);
    color: var(--yellow);
    border: 1px solid var(--yellow-line);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Anton', sans-serif;
    font-size: 0.86rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
    border-radius: 50%;
}
.avatar.lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center; gap: 5px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid;
    line-height: 1.4;
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.badge.pending   { background: rgba(243, 156, 18, 0.10); color: var(--orange); border-color: rgba(243, 156, 18, 0.45); }
.badge.confirmed { background: rgba(52, 152, 219, 0.10); color: var(--blue); border-color: rgba(52, 152, 219, 0.45); }
.badge.completed { background: rgba(46, 204, 113, 0.10); color: var(--green); border-color: rgba(46, 204, 113, 0.45); }
.badge.cancelled, .badge.no_show { background: rgba(231, 76, 60, 0.10); color: var(--red); border-color: rgba(231, 76, 60, 0.45); }
.badge.paid     { background: rgba(46, 204, 113, 0.10); color: var(--green); border-color: rgba(46, 204, 113, 0.45); }
.badge.partial  { background: rgba(243, 156, 18, 0.10); color: var(--orange); border-color: rgba(243, 156, 18, 0.45); }
.badge.gold,
.badge.yellow,
.badge.member {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
}
.badge.gold::before,
.badge.yellow::before,
.badge.member::before { background: var(--black); }
.badge.muted {
    background: var(--black-4);
    color: var(--text-mute);
    border-color: var(--black-5);
}

/* ────────────────────────────────────────────
   ROW ACTIONS — uniform compact icon buttons
─────────────────────────────────────────────*/
.row-actions {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
}
.act-btn {
    width: 30px; height: 30px;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--black-5);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.12s;
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    font-family: inherit;
    font-size: 0.82rem;
    line-height: 1;
    text-decoration: none;
    padding: 0;
}
.act-btn svg { width: 14px; height: 14px; pointer-events: none; }
.act-btn:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    background: var(--yellow-soft);
}
.act-btn.danger:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(231, 76, 60, 0.08);
}
.act-btn.primary {
    background: var(--yellow);
    color: var(--black);
    border-color: var(--yellow);
    font-family: 'Anton', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: auto;
    padding: 0 10px;
    font-size: 0.74rem;
}
.act-btn.primary:hover {
    background: transparent;
    color: var(--yellow);
}

/* ────────────────────────────────────────────
   SKELETON LOADING
─────────────────────────────────────────────*/
.skeleton {
    background: linear-gradient(90deg,
        var(--black-3) 0%,
        var(--black-4) 50%,
        var(--black-3) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skel-row td { padding: 14px 16px; }
.skel-bar {
    display: block;
    height: 12px;
    background: linear-gradient(90deg,
        var(--black-3) 0%,
        var(--black-4) 50%,
        var(--black-3) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}
.skel-bar.sm { height: 9px; width: 50%; }
.skel-bar.md { height: 11px; width: 75%; }
.skel-bar.lg { height: 13px; width: 100%; }

/* ────────────────────────────────────────────
   EMPTY STATE
─────────────────────────────────────────────*/
.empty-state {
    padding: 60px 24px;
    text-align: center;
    background: var(--black-2);
    border: 1px dashed var(--black-5);
    margin: 20px;
}
.empty-state-icon {
    width: 64px; height: 64px;
    border: 2px solid var(--yellow-line);
    color: var(--yellow);
    border-radius: 50%;
    display: flex;
    align-items: center; justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    background: var(--yellow-soft);
    overflow: hidden;
}
.empty-state-icon svg { width: 28px; height: 28px; flex-shrink: 0; }
.empty-state strong {
    display: block;
    font-family: 'Anton', sans-serif;
    color: var(--text);
    font-size: 1.15rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin: 0 auto 18px;
    max-width: 360px;
    line-height: 1.5;
}
.empty-state .btn-icon,
.empty-state .btn-primary {
    display: inline-flex;
    width: auto;
}

/* ────────────────────────────────────────────
   MOBILE — table rows become cards
─────────────────────────────────────────────*/
.cards-list {
    display: none;
}
.card-row {
    background: var(--black-2);
    border: 1px solid var(--line);
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.15s;
}
.card-row:hover, .card-row:active {
    border-color: var(--yellow-line);
    background: var(--black-3);
}
.card-row-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.card-row-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.card-row-title small {
    display: block;
    color: var(--text-mute);
    font-size: 0.78rem;
    font-weight: 400;
    margin-top: 2px;
}
.card-row-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.card-row-body span {
    display: inline-flex; align-items: center; gap: 4px;
}
.card-row-body strong {
    color: var(--text);
    font-weight: 500;
}
.card-row-foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}
.card-row-foot .row-actions { flex-wrap: wrap; gap: 5px; }

/* ────────────────────────────────────────────
   DRAWER (slide-over from right)
─────────────────────────────────────────────*/
.drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.drawer.show {
    opacity: 1;
    pointer-events: auto;
}
.drawer-card {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: var(--black-2);
    border-left: 1px solid var(--yellow-line);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.drawer.show .drawer-card { transform: translateX(0); }
.drawer-card.lg { max-width: 640px; }

.drawer-head {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--black-3);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
}
.drawer-head-main {
    display: flex; gap: 14px; align-items: center;
    min-width: 0; flex: 1;
}
.drawer-head-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    word-break: break-word;
}
.drawer-head-sub {
    color: var(--text-dim);
    font-size: 0.85rem;
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.drawer-head-sub a {
    color: var(--yellow);
    text-decoration: none;
}
.drawer-close {
    background: transparent;
    border: 1px solid var(--black-5);
    color: var(--text-dim);
    width: 32px; height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: 0.15s;
}
.drawer-close:hover {
    border-color: var(--yellow);
    color: var(--yellow);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
}
.drawer-section { margin-bottom: 24px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-title {
    font-family: 'Anton', sans-serif;
    font-size: 0.78rem;
    color: var(--yellow);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--yellow-line);
}
.kv-list {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px 16px;
    font-size: 0.88rem;
}
.kv-list dt {
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-size: 0.7rem;
    font-family: 'Anton', sans-serif;
    align-self: center;
}
.kv-list dd { color: var(--text); word-break: break-word; }
.kv-list dd a { color: var(--yellow); }

.drawer-foot {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    background: var(--black-3);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.drawer-foot .btn-primary,
.drawer-foot .btn-submit { flex: 1; padding: 11px 14px; font-size: 0.85rem; }
.drawer-foot .btn-secondary,
.drawer-foot .btn-danger { flex: 0 0 auto; }

/* History list inside drawer */
.history-list {
    display: flex; flex-direction: column;
    gap: 8px;
}
.history-row {
    background: var(--black-3);
    border: 1px solid var(--line);
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.85rem;
}
.history-row .h-date {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 2px;
}
.history-row .h-amt {
    color: var(--yellow);
    font-family: 'Anton', sans-serif;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ────────────────────────────────────────────
   CHARTS
─────────────────────────────────────────────*/
.chart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.chart {
    background: var(--black-3);
    border: 1px solid var(--line);
    padding: 20px;
}
.chart h4 {
    font-family: 'Anton', sans-serif;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Bar chart */
.bar-chart {
    display: flex; align-items: flex-end; gap: 8px;
    height: 200px;
    padding-top: 10px;
    border-bottom: 1px solid var(--line);
}
.bar-col {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    min-width: 28px;
    align-self: stretch;
    justify-content: flex-end;
}
.bar-wrap {
    flex: 1;
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-end;
    position: relative;
}
.bar {
    width: 100%; max-width: 38px;
    background: var(--yellow);
    transition: 0.25s;
    flex-shrink: 0;
}
.bar:hover { background: var(--yellow-2); transform: scaleY(1.03); transform-origin: bottom; }
.bar-label {
    font-size: 0.68rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 6px;
    flex-shrink: 0;
    text-align: center;
}
.bar-label.dim { color: var(--black-5); }
.bar-val {
    font-size: 0.66rem;
    color: var(--yellow);
    font-family: 'Anton', sans-serif;
    letter-spacing: 0.5px;
    position: absolute;
    bottom: 100%;
    margin-bottom: 3px;
    white-space: nowrap;
    pointer-events: none;
}

/* Donut */
.donut-wrap {
    display: flex; align-items: center; justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.donut {
    width: 150px; height: 150px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.donut-center {
    position: absolute; inset: 22px;
    background: var(--black-3);
    border-radius: 50%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
}
.donut-center .num {
    font-family: 'Anton', sans-serif;
    font-size: 1.15rem;
    color: var(--yellow);
    line-height: 1;
}
.donut-center .lbl {
    font-size: 0.66rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
}
.legend {
    font-size: 0.84rem;
    min-width: 0;
}
.legend-item {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px;
    color: var(--text-dim);
}
.legend-item strong { color: var(--text); }
.legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ────────────────────────────────────────────
   MODAL
─────────────────────────────────────────────*/
.modal {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start; justify-content: center;
    padding: 24px 16px;
    overflow-y: auto;
}
.modal.show { display: flex; }
.modal-card {
    background: var(--black-3);
    border: 1px solid var(--yellow-line);
    padding: 26px;
    width: 100%; max-width: 560px;
    box-shadow: var(--shadow);
    position: relative;
    margin: auto;
}
.modal-card::before, .modal-card::after {
    content: ''; position: absolute;
    width: 12px; height: 12px;
    background: var(--yellow);
}
.modal-card::before { top: -6px; left: -6px; }
.modal-card::after { bottom: -6px; right: -6px; }
.modal-card.lg { max-width: 760px; }

.modal-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.modal-title {
    font-family: 'Anton', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text);
}
.modal-close {
    background: transparent;
    border: 1px solid var(--black-5);
    color: var(--text-dim);
    width: 30px; height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
    transition: 0.15s;
}
.modal-close:hover { border-color: var(--yellow); color: var(--yellow); }

/* ────────────────────────────────────────────
   BILL BUILDER
─────────────────────────────────────────────*/
.bill-items { margin-bottom: 14px; }
.bill-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.8fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: start;
}
.bill-item-row input,
.bill-item-row select { padding: 9px 10px; font-size: 0.86rem; }

/* ── Service searchable dropdown ── */
.svc-dropdown { position: relative; }
.svc-input-wrap {
    display: flex;
    align-items: center;
    background: var(--black-3);
    border: 1px solid var(--black-5);
    border-radius: 6px;
    transition: border-color 0.15s;
    overflow: hidden;
}
.svc-input-wrap:focus-within { border-color: var(--yellow); }
.svc-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 9px 10px;
    font-size: 0.86rem;
    color: var(--text);
    font-family: inherit;
    min-width: 0;
}
.svc-input-wrap input::placeholder { color: var(--text-mute); }
.svc-clear-btn {
    background: none;
    border: none;
    color: var(--text-mute);
    cursor: pointer;
    padding: 0 8px;
    font-size: 1rem;
    line-height: 1;
    display: none;
    flex-shrink: 0;
}
.svc-clear-btn.visible { display: block; }
.svc-clear-btn:hover { color: var(--text); }
.svc-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--black-3);
    border: 1px solid var(--black-5);
    border-radius: 8px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 200;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.svc-menu.open { display: block; }
.svc-menu::-webkit-scrollbar { width: 4px; }
.svc-menu::-webkit-scrollbar-track { background: transparent; }
.svc-menu::-webkit-scrollbar-thumb { background: var(--black-5); border-radius: 4px; }
.svc-option {
    padding: 9px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    transition: background 0.1s;
}
.svc-option:last-child { border-bottom: none; }
.svc-option:hover, .svc-option.focused { background: var(--black-4); }
.svc-option.custom-option { color: var(--yellow); }
.opt-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt-name { font-size: 0.88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.opt-badge {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    padding: 1px 6px;
    border-radius: 20px;
    border: 1px solid;
    text-transform: capitalize;
    white-space: nowrap;
}
.opt-price { font-size: 0.84rem; color: var(--text-dim); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.btn-x {
    background: transparent; color: var(--red);
    border: 1px solid var(--red);
    border-radius: 4px;
    width: 32px; height: 32px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: 0.15s;
    flex-shrink: 0;
}
.btn-x:hover { background: var(--red); color: white; }

.bill-totals {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.bill-totals .row {
    display: flex; justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-dim);
}
.bill-totals .row span:last-child { color: var(--text); font-weight: 500; }
.bill-totals .row.total {
    font-family: 'Anton', sans-serif;
    font-size: 1.4rem;
    color: var(--yellow);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.bill-totals .row.total span:last-child { color: var(--yellow); font-weight: normal; }

.bill-receipt {
    background: white;
    color: black;
    padding: 22px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
}
.bill-receipt table {
    min-width: 0;
}
.bill-receipt th, .bill-receipt td {
    border-bottom: 1px solid #ddd;
    color: black;
    background: white;
    padding: 8px 10px;
}
.bill-receipt th { background: #f8f8f8; }
.bill-receipt .bill-totals { border-top: 1px solid #ddd; }
.bill-receipt .bill-totals .row { color: #555; }
.bill-receipt .bill-totals .row span:last-child { color: #000; }
.bill-receipt .bill-totals .row.total { color: #000; border-top-color: #000; }
.bill-receipt .bill-totals .row.total span:last-child { color: #000; }

/* Member banner inside bill modal */
.member-banner {
    background: var(--yellow-soft);
    border: 1px solid var(--yellow);
    color: var(--yellow);
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ────────────────────────────────────────────
   GALLERY (admin)
─────────────────────────────────────────────*/
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.gal-card {
    background: var(--black-2);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: 0.18s;
    position: relative;
}
.gal-card.inactive { opacity: 0.45; }
.gal-card:hover { border-color: var(--yellow); }
.gal-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.gal-meta { padding: 12px 14px; }
.gal-meta strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text);
}
.gal-meta span {
    color: var(--text-mute);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.gal-actions {
    position: absolute; top: 8px; right: 8px;
    display: flex; gap: 6px;
    opacity: 0;
    transition: 0.18s;
}
.gal-card:hover .gal-actions { opacity: 1; }
.gal-actions .btn-icon, .gal-actions .btn-danger {
    padding: 6px 10px;
    font-size: 0.74rem;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.7);
}

/* On touch devices, gallery actions should always be visible */
@media (hover: none) {
    .gal-actions { opacity: 1; }
}

/* ────────────────────────────────────────────
   MEMBERSHIP CARDS
─────────────────────────────────────────────*/
.member-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.member-info-card {
    background: var(--black-3);
    border: 1px solid var(--yellow);
    padding: 26px;
    position: relative;
    overflow: hidden;
}
.member-info-card.terms {
    border-color: var(--yellow-line);
}
.member-info-card::before {
    content: '365';
    position: absolute;
    right: -20px; top: 50%;
    transform: translateY(-50%);
    font-family: 'Anton', sans-serif;
    font-size: 9rem;
    color: rgba(255, 230, 0, 0.04);
    line-height: 1;
    pointer-events: none;
}
.mic-tag {
    display: inline-block;
    background: var(--yellow);
    color: var(--black);
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: 'Anton', sans-serif;
    letter-spacing: 2px;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.member-info-card h3 {
    font-family: 'Anton', sans-serif;
    font-size: 1.7rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 14px;
    color: var(--yellow);
    position: relative;
    z-index: 1;
}
.member-info-card ul,
.member-info-card ol {
    list-style: none;
    counter-reset: item;
    position: relative;
    z-index: 1;
}
.member-info-card ol li,
.member-info-card ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.55;
}
.member-info-card ul li::before {
    content: '✦';
    position: absolute; left: 0; top: 0;
    color: var(--yellow);
}
.member-info-card ol li {
    counter-increment: item;
}
.member-info-card ol li::before {
    content: counter(item);
    position: absolute; left: 0; top: 0;
    color: var(--black);
    background: var(--yellow);
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.74rem;
    font-family: 'Anton', sans-serif;
}
.mic-price {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--yellow-line);
    border-bottom: 1px solid var(--yellow-line);
    position: relative;
    z-index: 1;
}
.mic-price span {
    color: var(--text-dim);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.mic-price strong {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    color: var(--yellow);
    line-height: 1;
}
.mic-foot {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-top: 12px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ────────────────────────────────────────────
   TOAST
─────────────────────────────────────────────*/
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--yellow);
    color: var(--black);
    padding: 12px 20px;
    border: none;
    box-shadow: var(--shadow-y);
    transform: translateX(420px);
    transition: 0.35s;
    z-index: 300;
    max-width: 320px;
    font-family: 'Anton', sans-serif;
    font-size: 0.92rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.toast.show { transform: translateX(0); }
.toast.error { background: var(--red); color: white; }

/* ────────────────────────────────────────────
   PRINT
─────────────────────────────────────────────*/
@media print {
    .sidebar, .topbar, .panel-head, .modal-head, .modal-close, button, .menu-toggle { display: none !important; }
    body { background: white; color: black; }
    .modal { position: static; background: white; padding: 0; }
    .modal-card { box-shadow: none; border: none; max-width: 100%; padding: 0; }
    .modal-card::before, .modal-card::after { display: none; }
    .bill-receipt, .bill-receipt * { color: black !important; }
    .bill-receipt { padding: 20px; }
    .dash { grid-template-columns: 1fr; }
    .main { padding: 0; }
}

/* ────────────────────────────────────────────
   RESPONSIVE
─────────────────────────────────────────────*/

/* Tablet */
@media (max-width: 1024px) {
    :root { --side-w: 200px; }
    .main { padding: 22px 22px; }
    .chart-grid { grid-template-columns: 1fr; }
    .member-cards { grid-template-columns: 1fr; }
}

/* Mobile — drawer sidebar */
@media (max-width: 760px) {
    .dash { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; top: 0; left: 0;
        width: 280px;
        height: 100vh;
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: 0 0 32px rgba(0, 0, 0, 0.6);
    }
    .sidebar.open { transform: translateX(0); }
    .menu-toggle { display: inline-flex; }

    .main { padding: 18px 16px; }
    .topbar { margin-bottom: 18px; padding-bottom: 14px; }
    .page-title { font-size: 1.4rem; }
    .page-title .sub { font-size: 0.78rem; margin-top: 4px; }

    /* KPIs — 2-up on mobile */
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
    .kpi { padding: 14px 14px; }
    .kpi-label { font-size: 0.62rem; letter-spacing: 1.5px; margin-bottom: 6px; }
    .kpi-value { font-size: 1.5rem; }
    .kpi-foot { font-size: 0.7rem; }

    /* Quick actions full width */
    .quick-actions { grid-template-columns: 1fr; gap: 8px; }
    .qa-btn { padding: 12px 14px; font-size: 0.86rem; }

    /* Panels */
    .panel { margin-bottom: 14px; }
    .panel-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 14px;
    }
    .panel-title { font-size: 0.95rem; }
    .panel-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    /* Toolbar adjusts */
    .toolbar { padding: 12px 14px; gap: 8px; }
    .toolbar-search { width: 100%; flex: 1 0 100%; min-width: 0; }
    .toolbar-filters { width: 100%; }
    .toolbar input[type="date"] { flex: 1; min-width: 0; }
    .toolbar-divider { display: none; }

    /* Hide table, show cards on mobile */
    .table-wrap { display: none; }
    .cards-list { display: block; padding: 12px; }

    .search-input { min-width: 0; flex: 1; }
    .filter-select, .panel-actions .btn-icon { flex: 1; min-width: 0; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    /* Prevent iOS zoom on input focus */
    input, select, textarea { font-size: 16px; padding: 12px 13px; }
    label { font-size: 0.66rem; letter-spacing: 1.5px; }

    /* Modal — full-screen on mobile */
    .modal { padding: 0; align-items: stretch; }
    .modal-card {
        max-width: 100%;
        max-height: 100%;
        height: 100vh;
        margin: 0;
        padding: 18px 16px 100px;
        overflow-y: auto;
        border: none;
    }
    .modal-card::before, .modal-card::after { display: none; }
    .modal-card.lg { max-width: 100%; }
    .modal-head {
        position: sticky; top: -18px;
        background: var(--black-3);
        margin: -18px -16px 16px;
        padding: 16px;
        z-index: 5;
    }

    /* Drawer — full screen on mobile */
    .drawer { padding: 0; }
    .drawer-card {
        max-width: 100%;
        border-left: none;
    }
    .drawer-head { padding: 16px 16px 14px; }
    .drawer-body { padding: 16px; }
    .drawer-foot { padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
    .kv-list { grid-template-columns: 100px 1fr; gap: 6px 12px; }

    /* Bill items stack on mobile */
    .bill-item-row {
        grid-template-columns: 1fr auto;
        gap: 6px 8px;
    }
    .bill-item-row .svc-dropdown { grid-column: 1 / -1; }
    .bill-item-row input[data-field="price"] { grid-column: 1; }
    .bill-item-row .btn-x { grid-column: 2; grid-row: 3; }
    .svc-menu { max-height: 160px; }

    /* Charts */
    .bar-chart { height: 160px; }

    /* Toast — bottom-center bar */
    .toast {
        bottom: 16px; right: 16px; left: 16px;
        max-width: none;
        text-align: center;
        transform: translateY(120px);
        font-size: 0.86rem;
    }
    .toast.show { transform: translateY(0); }

    /* Membership card */
    .member-info-card { padding: 20px 18px; }
    .member-info-card h3 { font-size: 1.4rem; }
    .member-info-card::before { font-size: 7rem; }
    .mic-price strong { font-size: 1.7rem; }
}

/* Small phones */
@media (max-width: 420px) {
    .main { padding: 14px 12px; }
    .page-title { font-size: 1.2rem; }
    .kpi-grid { gap: 8px; }
    .kpi { padding: 12px; }
    .kpi-value { font-size: 1.3rem; }
    .panel-head { padding: 12px; }
    .toolbar { padding: 10px 12px; }
    .cards-list { padding: 10px; }
    .card-row { padding: 12px; }
}
