/* Super Admin — central panel */
:root {
    --ink: #0f1c17;
    --forest: #0b3d2e;
    --forest-2: #145c45;
    --gold: #b8923a;
    --gold-2: #d4b26a;
    --cream: #f4f1ea;
    --paper: #fffcf7;
    --muted: #6b736f;
    --line: rgba(15, 28, 23, 0.08);
    --danger: #b42318;
    --ok: #0f7a4c;
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }

html {
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", Tahoma, sans-serif;
    background:
        radial-gradient(1000px 500px at 100% 0%, rgba(184,146,58,.12), transparent 50%),
        linear-gradient(160deg, #eef2ef, var(--cream));
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.85;
    overflow-x: clip;
    max-width: 100vw;
}

h1, h2, h3,
.brand-name,
.brand-sub,
.admin-nav a,
.top-kicker,
.top-title,
.btn,
.btn-gold,
.btn-forest,
.form-label,
.stat-label,
.stat-foot,
.list-title,
.showroom-name,
.field-label,
.modal-title,
.panel-head,
.badge-on,
.badge-off {
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", Tahoma, serif;
}

/* Keep LTR data (emails, URLs, passwords) readable */
.field-value.mono,
.mono,
input[dir="ltr"],
a[dir="ltr"] {
    font-family: "IBM Plex Sans Arabic", ui-monospace, Consolas, Tahoma, sans-serif;
    line-height: 1.45;
}

.admin-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
}

.admin-sidebar {
    background: linear-gradient(180deg, #0a3327, #0f1c17);
    color: #f7f3ea;
    padding: 1.35rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.brand-block {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: .35rem .45rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 1rem;
}
.brand-mark {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; font-weight: 700;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    color: #1a1408;
}
.brand-logo-img {
    width: 44px; height: 44px; border-radius: 12px;
    object-fit: cover; background: #fff; flex-shrink: 0;
}
.login-logo {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fff;
    display: block;
    margin-inline: auto;
}
.brand-name { font-size: 1.05rem; }
.brand-sub { font-size: .78rem; opacity: .65; }

.admin-nav { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.admin-nav a {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    padding: .75rem .9rem;
    border-radius: 12px;
    display: flex; align-items: center; gap: .7rem;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active {
    background: linear-gradient(90deg, rgba(184,146,58,.22), rgba(255,255,255,.04));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--gold);
}

.sidebar-foot {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: .9rem;
    color: rgba(255,255,255,.7);
}

.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: rgba(255,252,247,.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.admin-topbar-start {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--forest);
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    padding: 0;
}
.sidebar-toggle:hover { background: #f7faf8; }
.sidebar-backdrop {
    display: none;
}
.top-kicker {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 .55rem;
    display: block;
}
.top-title {
    font-size: 1.45rem;
    margin: 0;
    color: var(--forest);
    line-height: 1.9;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    border: none; color: #1a1408; font-weight: 600;
    border-radius: 999px; padding: .65rem 1.15rem; text-decoration: none;
    display: inline-flex; align-items: center; gap: .4rem;
}
.btn-gold:hover { filter: brightness(1.05); color: #1a1408; }

.btn-forest {
    background: var(--forest); border: none; color: #fff;
    border-radius: 12px; padding: .7rem 1.2rem; font-weight: 600;
}
.btn-forest:hover { background: var(--forest-2); color: #fff; }

.admin-content { padding: 1.5rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.2rem 1.25rem 1.15rem;
    border: 1px solid transparent;
    min-height: 148px;
    box-shadow: 0 12px 32px rgba(15,28,23,.06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15,28,23,.1);
}
.stat-card::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}
.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .85rem;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}
.stat-label {
    font-weight: 700;
    font-size: .98rem;
    color: var(--ink);
}
.stat-value {
    font-size: 2.15rem;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -.02em;
}
.stat-foot {
    margin-top: .45rem;
    font-size: .82rem;
    color: var(--muted);
}

.stat-card.tone-total {
    background: linear-gradient(145deg, #e7f1ec 0%, #f7fbf9 55%, #fff 100%);
    border-color: rgba(11,61,46,.16);
}
.stat-card.tone-total::before { background: var(--forest); }
.stat-card.tone-total .stat-icon { background: rgba(11,61,46,.12); color: var(--forest); }
.stat-card.tone-total .stat-value { color: var(--forest); }

.stat-card.tone-active {
    background: linear-gradient(145deg, #e7f6ef 0%, #f5fcf8 55%, #fff 100%);
    border-color: rgba(15,122,76,.18);
}
.stat-card.tone-active::before { background: #0f7a4c; }
.stat-card.tone-active .stat-icon { background: rgba(15,122,76,.12); color: #0f7a4c; }
.stat-card.tone-active .stat-value { color: #0f7a4c; }
.stat-card.tone-active .stat-label { color: #0f7a4c; }

.stat-card.tone-login {
    background: linear-gradient(145deg, #f4ecda 0%, #fbf7ee 55%, #fff 100%);
    border-color: rgba(184,146,58,.28);
}
.stat-card.tone-login::before { background: var(--gold); }
.stat-card.tone-login .stat-icon { background: rgba(184,146,58,.18); color: #8a6418; }
.stat-card.tone-login .stat-value { color: #7a5612; }

.stat-card.tone-off {
    background: linear-gradient(145deg, #f6eaea 0%, #fbf6f6 55%, #fff 100%);
    border-color: rgba(180,35,24,.16);
}
.stat-card.tone-off::before { background: var(--danger); }
.stat-card.tone-off .stat-icon { background: rgba(180,35,24,.1); color: var(--danger); }
.stat-card.tone-off .stat-value { color: var(--danger); }

/* legacy fallback if old markup remains */
.stat-card .label { color: var(--muted); font-size: .9rem; }
.stat-card .value { font-size: 1.85rem; font-weight: 700; color: var(--forest); line-height: 1.2; }

.panel {
    background: rgba(255,252,247,.94);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(15,28,23,.05);
    overflow: hidden;
}
.panel-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(90deg, rgba(11,61,46,.05), transparent);
}
.panel-body { padding: 1.25rem; }

.table-admin { margin: 0; }
.table-admin thead th {
    background: var(--forest);
    color: #fff;
    font-weight: 500;
    border: none;
    white-space: nowrap;
    padding: .85rem 1rem;
}
.table-admin td {
    vertical-align: middle;
    padding: .95rem 1rem;
    border-color: var(--line);
}
.table-admin tbody tr:hover { background: #f7faf8; }

.cred-box {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: .78rem;
    background: #fff8eb;
    border: 1px solid #f0e0b8;
    border-radius: 8px;
    padding: .35rem .55rem;
    direction: ltr;
}
.link-chip {
    display: inline-block;
    direction: ltr;
    font-size: .8rem;
    color: var(--forest-2);
    word-break: break-all;
}
.db-chip {
    display: inline-block;
    direction: ltr;
    font-size: .72rem;
    color: var(--muted);
    background: rgba(11,61,46,.06);
    border-radius: 6px;
    padding: .2rem .45rem;
}
.badge-on {
    background: rgba(15,122,76,.12); color: #0f7a4c;
    border-radius: 999px; padding: .3rem .65rem; font-size: .78rem; font-weight: 600;
}
.badge-off {
    background: rgba(180,35,24,.1); color: var(--danger);
    border-radius: 999px; padding: .3rem .65rem; font-size: .78rem; font-weight: 600;
}
.btn-del {
    border: 1px solid rgba(180,35,24,.25);
    color: var(--danger);
    background: #fff;
    border-radius: 999px;
    padding: .35rem .75rem;
    font-size: .8rem;
}
.btn-del:hover { background: #fff5f5; }

.form-label {
    font-weight: 700;
    color: #24352e;
    margin-bottom: .45rem;
    font-size: .95rem;
}
.form-control, .form-select {
    border-radius: 12px;
    border: 1.5px solid rgba(11,61,46,.22);
    padding: 1rem .95rem 1.2rem;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15,28,23,.06);
    color: var(--ink);
    min-height: 58px;
    line-height: 2.15;
    overflow: visible;
}
.form-select {
    padding: 1.1rem 1.85rem 1.25rem 2.75rem !important;
    min-height: 64px;
    line-height: 1.85;
    font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
    font-weight: 600;
    background-position: left .9rem center !important;
}
html[dir="rtl"] .form-select {
    padding: 1.1rem 1.85rem 1.25rem 2.75rem !important;
    text-align: right;
}
.form-control::placeholder, .form-select::placeholder {
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", Tahoma, serif;
    color: #8a9490;
    opacity: 1;
    line-height: 2.15;
}
.form-control:focus, .form-select:focus {
    border-color: rgba(11,61,46,.45);
    box-shadow: 0 0 0 .2rem rgba(11,61,46,.12), 0 6px 16px rgba(15,28,23,.08);
    background: #fff;
}
.form-control-lg {
    padding: 1.05rem 1.05rem 1.25rem;
    font-size: 1.02rem;
    min-height: 62px;
    line-height: 2.15;
}
input[dir="ltr"].form-control,
.form-control[dir="ltr"] {
    font-family: "IBM Plex Sans Arabic", ui-monospace, Consolas, Tahoma, sans-serif;
    line-height: 1.55;
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.onboard-panel {
    max-width: none;
    width: 100%;
    border: 1px solid rgba(11,61,46,.12);
    box-shadow: 0 16px 40px rgba(15,28,23,.07);
}
.onboard-panel .panel-body {
    background: #f3f6f4;
}
.onboard-panel .mb-3,
.onboard-panel .col-md-6 {
    margin-bottom: 1rem !important;
}
.form-section-title {
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", serif;
    font-size: 1.1rem;
    color: var(--forest);
    margin-bottom: 1.15rem;
    padding: .55rem .85rem;
    border-bottom: none;
    background: rgba(11,61,46,.06);
    border-radius: 12px;
    border: 1px solid rgba(11,61,46,.1);
}
.info-soft {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    background: rgba(11,61,46,.05);
    border: 1px solid rgba(11,61,46,.08);
    border-radius: 14px;
    padding: .9rem 1rem;
    color: #345247;
    font-size: .92rem;
    line-height: 1.7;
}
.info-soft i { color: var(--forest); margin-top: .2rem; }
.onboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(11,61,46,.12);
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

/* Settings / password page */
.settings-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}
.settings-side .panel-body { text-align: center; padding: 1.75rem 1.25rem; }
.settings-avatar {
    width: 72px; height: 72px; margin: 0 auto 1rem;
    border-radius: 20px; display: grid; place-items: center;
    font-weight: 700; font-size: 1.4rem; color: #1a1408;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
}
.settings-name {
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", serif;
    font-size: 1.25rem; color: var(--forest); margin-bottom: .25rem;
}
.settings-email {
    color: var(--muted); font-size: .88rem; margin-bottom: 1.25rem;
    font-family: ui-monospace, Consolas, monospace;
}
.settings-points {
    list-style: none; padding: 0; margin: 0; text-align: right;
}
.settings-points li {
    display: flex; align-items: center; gap: .55rem;
    padding: .55rem 0; border-top: 1px solid var(--line);
    font-size: .9rem; color: #345247;
}
.settings-points i { color: var(--forest); }
.settings-main { min-width: 0; }
.settings-main .panel-body {
    background: #f3f6f4;
}
.settings-main .form-control {
    border: 1.5px solid rgba(11,61,46,.22);
    background: #fff;
    box-shadow: 0 4px 14px rgba(15,28,23,.06);
}

.input-icon { position: relative; }
.input-icon i {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--muted); pointer-events: none;
}
.input-icon .form-control { padding-right: 2.5rem; }

.settings-stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.settings-logo-img {
    width: 88px; height: 88px; object-fit: cover; border-radius: 20px;
    margin: 0 auto 1rem; background: #fff; border: 1px solid var(--line);
}
.logo-upload-row { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.logo-preview-box {
    width: 96px; height: 96px; border-radius: 18px;
    border: 1px solid var(--line); background: #fff;
    display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
    font-weight: 700; color: var(--forest); font-size: 1.4rem;
}
.logo-preview-box img { width: 100%; height: 100%; object-fit: cover; }
.showroom-avatar-img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.9);
    background: #fff;
    box-shadow: 0 8px 18px rgba(15,28,23,.1);
}
.showroom-logo-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    padding: 1rem 1.25rem 1.15rem;
    border-top: 1px solid rgba(11,61,46,.08);
    background: linear-gradient(90deg, rgba(11,61,46,.04), rgba(184,146,58,.05));
}

.showroom-edit-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}
.showroom-edit-modal .modal-header {
    background: linear-gradient(90deg, rgba(11,61,46,.06), transparent);
    border-bottom: 1px solid var(--line);
}
.showroom-edit-modal .modal-title {
    color: var(--forest);
    font-weight: 700;
}
.showroom-edit-modal .modal-footer {
    border-top: 1px solid var(--line);
}

@media (max-width: 992px) {
    .settings-grid { grid-template-columns: 1fr; }
}

/* —— Showroom cards (professional list) —— */
.showroom-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}
.list-title {
    margin: 0;
    font-size: 1.2rem;
    color: var(--forest);
    font-weight: 700;
}
.btn-sm-gold {
    padding: .5rem 1rem;
    font-size: .9rem;
}

.showroom-card {
    position: relative;
    background: linear-gradient(180deg, #fffefb 0%, #fffcf7 100%);
    border: 1px solid rgba(11,61,46,.1);
    border-radius: 22px;
    box-shadow: 0 14px 36px rgba(15,28,23,.06);
    margin-bottom: 1.15rem;
    overflow: hidden;
}
.showroom-card::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--forest), var(--gold), var(--forest-2));
}
.showroom-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.4rem 1.1rem;
    border-bottom: 1px solid rgba(11,61,46,.08);
    background: linear-gradient(120deg, rgba(11,61,46,.05), rgba(184,146,58,.06) 45%, transparent);
}
.showroom-identity {
    display: flex;
    align-items: center;
    gap: .95rem;
    min-width: 0;
}
.showroom-avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1408;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(184,146,58,.28);
}
.showroom-avatar-img {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 8px 18px rgba(15,28,23,.1);
}
.showroom-name {
    font-family: "Noto Nastaliq Urdu", "IBM Plex Sans Arabic", serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
}
.showroom-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    font-size: .82rem;
    margin-top: .2rem;
}
.showroom-meta .dot { opacity: .45; }
.showroom-top-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
}
.badge-on, .badge-off {
    display: inline-flex;
    align-items: center;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}
.badge-on {
    background: rgba(15,122,76,.12);
    color: var(--ok);
}
.badge-off {
    background: rgba(180,35,24,.1);
    color: var(--danger);
}
.btn-open {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--forest), var(--forest-2));
    color: #fff;
    border-radius: 999px;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(11,61,46,.2);
}
.btn-open:hover { filter: brightness(1.06); color: #fff; }
.btn-edit-soft {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(11,61,46,.18);
    background: #fff;
    color: var(--forest);
    display: grid;
    place-items: center;
}
.btn-edit-soft:hover { background: rgba(11,61,46,.06); }
.btn-del-soft {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(180,35,24,.16);
    background: #fff;
    color: var(--danger);
    display: grid;
    place-items: center;
}
.btn-del-soft:hover { background: #fff5f5; }

.showroom-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    background: #f0f4f2;
}
.field {
    padding: .95rem 1rem;
    border: 1.5px solid rgba(11,61,46,.18);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15,28,23,.08);
}
.field-label {
    font-size: .8rem;
    color: #4a5650;
    margin-bottom: .5rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.field-value {
    font-size: .95rem;
    color: var(--ink);
    word-break: break-word;
    line-height: 1.5;
    background: #f7faf8;
    border: 1px solid rgba(11,61,46,.14);
    border-radius: 10px;
    padding: .55rem .7rem;
    min-height: 42px;
    display: flex;
    align-items: center;
}
.field-value a {
    color: var(--forest-2);
    text-decoration: none;
    font-weight: 500;
}
.field-value a:hover { text-decoration: underline; }
.field-value.mono {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: .86rem;
    direction: ltr;
    text-align: left;
    background: #eef5f1;
    border-color: rgba(11,61,46,.2);
    padding: .55rem .7rem;
}

.copy-row {
    display: flex;
    align-items: center;
    gap: .45rem;
}
.copy-row .field-value { min-width: 0; flex: 1; }
.btn-copy {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid rgba(11,61,46,.2);
    background: #fff;
    color: var(--forest);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: .15s ease;
    box-shadow: 0 2px 8px rgba(15,28,23,.06);
}
.btn-copy:hover { background: rgba(11,61,46,.08); }
.btn-copy.copied {
    background: rgba(15,122,76,.12);
    color: #0f7a4c;
    border-color: rgba(15,122,76,.2);
}

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .showroom-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .admin-shell {
        display: block;
        min-height: 100vh;
    }
    .sidebar-toggle { display: inline-flex; }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 28, 23, .5);
        z-index: 1030;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .admin-sidebar {
        position: fixed !important;
        top: 0;
        bottom: 0;
        right: 0;
        left: auto;
        width: min(280px, 85vw);
        height: 100dvh;
        max-height: 100dvh;
        z-index: 1040;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform .25s ease, visibility .25s ease;
        box-shadow: none;
        overflow-y: auto;
    }

    .admin-shell.sidebar-open .admin-sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        box-shadow: -16px 0 48px rgba(0, 0, 0, .28);
    }

    .admin-shell.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .admin-sidebar .sidebar-close {
        display: inline-flex;
    }

    .admin-main {
        width: 100%;
        min-height: 100vh;
    }

    .showroom-card-top { flex-direction: column; align-items: flex-start; }
    .showroom-fields { grid-template-columns: 1fr; }
    .admin-topbar {
        padding: .85rem 1rem;
        flex-wrap: wrap;
    }
    .admin-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .admin-content { padding: 1rem; }
    .top-title { font-size: 1.15rem; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .table-admin,
    table.table {
        min-width: 560px;
        font-size: .85rem;
    }
    .panel-head { flex-wrap: wrap; gap: .5rem; }
}

@media (max-width: 768px) {
    .admin-content { padding: .85rem .75rem 1.25rem; }
    .top-title { font-size: 1.1rem; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .stat-card { min-height: auto; padding: 1rem; }

    .showroom-list-head {
        flex-direction: column;
        align-items: stretch;
    }
    .showroom-list-head .btn,
    .showroom-list-head .btn-sm-gold {
        width: 100%;
        text-align: center;
    }
    .showroom-card-top { padding: 1rem; }
    .showroom-name { font-size: 1.1rem; }
    .showroom-fields { grid-template-columns: 1fr !important; }

    form .d-flex.gap-2,
    .panel-body.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    form .d-flex.gap-2 .form-control,
    form .d-flex.gap-2 .form-select,
    form .d-flex.gap-2 .btn {
        width: 100%;
        max-width: 100%;
    }

    .settings-grid { grid-template-columns: 1fr; }
    .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
}

@media (max-width: 576px) {
    .stat-grid { grid-template-columns: 1fr; }
    .admin-content { padding: .65rem .55rem 1rem; }
    .showroom-identity { gap: .65rem; }
    .showroom-avatar,
    .showroom-avatar-img { width: 46px; height: 46px; }
}

.sidebar-close {
    display: none;
    margin-inline-start: auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: #fff;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-close:hover { background: rgba(255,255,255,.18); }
