:root {
    --bg: #050506;
    --panel: #111116;
    --panel2: #17171d;
    --text: #fff;
    --muted: #a7adba;
    --gold: #d8a84f;
    --gold2: #ffcf69;
    --red: #d71920;
    --line: rgba(255,255,255,.12);
}

* { box-sizing: border-box; }
body.admin-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 5%, rgba(216,168,79,.16), transparent 28%),
        radial-gradient(circle at 85% 8%, rgba(215,25,32,.14), transparent 30%),
        linear-gradient(180deg, #050506, #09090c 46%, #050506);
}
a { color: inherit; text-decoration: none; }
.admin-sidebar {
    position: fixed;
    inset: 18px auto 18px 18px;
    width: 270px;
    padding: 18px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(10,10,13,.72);
    backdrop-filter: blur(22px);
}
.admin-brand {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.admin-brand span {
    grid-row: span 2;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #050506;
    font-weight: 950;
    background: linear-gradient(145deg, #fff, var(--gold2) 45%, #b87922);
}
.admin-brand strong { line-height: 1; }
.admin-brand small, .admin-topbar span, .eyebrow { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.admin-nav { display: grid; gap: 14px; margin-top: 18px; }
.admin-nav-group {
    display: grid;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.admin-nav-group:first-of-type {
    padding-top: 0;
    border-top: 0;
}
.admin-nav-group span {
    padding: 0 10px 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .9px;
    text-transform: uppercase;
}
.admin-nav a {
    padding: 12px 13px;
    border-radius: 14px;
    color: #dfe3ec;
    font-weight: 800;
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.admin-nav a.active {
    border: 1px solid rgba(216,168,79,.28);
    background: rgba(216,168,79,.12);
}
.admin-shell { margin-left: 306px; min-height: 100vh; }
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(5,5,6,.72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
}
.admin-topbar strong { display: block; margin-top: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }
.user-chip {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: #dfe3ec;
    font-weight: 850;
    text-transform: none;
    letter-spacing: 0;
}
.admin-main { padding: 24px; }
.admin-hero, .panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    padding: 28px;
    margin-bottom: 22px;
    border: 1px solid rgba(216,168,79,.28);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(216,168,79,.18), rgba(215,25,32,.10)), rgba(255,255,255,.05);
}
h1 { margin: 7px 0 8px; font-size: clamp(30px, 4vw, 54px); letter-spacing: -2px; line-height: 1; }
p { color: var(--muted); line-height: 1.65; margin: 0; }
.admin-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.admin-button.light { color: #050506; background: linear-gradient(135deg, #fff, #f4c45e); }
.admin-button.danger { background: var(--red); border-color: rgba(255,255,255,.2); }
.entity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.entity-card, .table-card, .form-card, .detail-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
}
.entity-card { min-height: 138px; padding: 20px; display: flex; flex-direction: column; justify-content: end; transition: .22s ease; }
.entity-card:hover { transform: translateY(-4px); border-color: rgba(216,168,79,.5); }
.entity-card span, .entity-card small { color: var(--muted); font-size: 12px; font-weight: 800; }
.entity-card strong { margin: 8px 0; font-size: 20px; }
.table-card { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.admin-table th, .admin-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.admin-table th { color: var(--gold2); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; }
.row-actions { white-space: nowrap; }
.row-actions a { display: inline-flex; margin-right: 8px; color: #fff; font-weight: 800; }
.row-actions a.danger { color: #ff8585; }
.form-card { padding: 22px; }
.design-head { align-items: center; }
.design-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.design-workspace.form-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
}
.design-workspace.form-collapsed .design-form {
    width: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    opacity: 0;
}
.design-form {
    max-height: calc(100vh - 118px);
    overflow: auto;
    transition: opacity .18s ease, width .18s ease, padding .18s ease;
}
.design-form .form-grid {
    grid-template-columns: 1fr;
}
.design-preview {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 12px;
    min-height: calc(100vh - 116px);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: 0 24px 80px rgba(0,0,0,.22);
}
.preview-toolbar,
.design-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.device-switcher {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.045);
}
.device-switcher button {
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
}
.device-switcher button.active {
    color: #050506;
    background: var(--gold2);
}
.preview-device-frame {
    width: 100%;
    height: calc(100vh - 178px);
    display: grid;
    place-items: start center;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background:
        linear-gradient(45deg, rgba(255,255,255,.045) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.045) 25%, transparent 25%),
        #070708;
    background-size: 22px 22px;
}
.editor-mode-note {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid rgba(216,168,79,.24);
    border-radius: 14px;
    background: rgba(216,168,79,.10);
}
.editor-mode-note strong {
    color: #fff;
    font-size: 13px;
}
.editor-mode-note span {
    color: #f3e3c1;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}
.preview-device-frame iframe {
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #111;
}
.preview-device-frame.tv iframe { width: 1920px; height: 1080px; }
.preview-device-frame.desktop iframe { width: 1440px; max-width: 100%; height: 900px; }
.preview-device-frame.tablet iframe { width: 768px; height: 1024px; }
.preview-device-frame.phone iframe { width: 390px; height: 844px; }
.design-css-field { grid-column: 1 / -1; }
.design-css-field textarea {
    font-family: Consolas, "Courier New", monospace;
    min-height: 180px;
}
.section-sorter {
    display: grid;
    gap: 10px;
}
.section-sort-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.055);
    box-shadow: 0 14px 36px rgba(0,0,0,.16);
}
.section-sort-item.dragging {
    opacity: .52;
    border-color: rgba(216,168,79,.72);
    background: rgba(216,168,79,.12);
}
.drag-handle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(216,168,79,.35);
    border-radius: 12px;
    background: rgba(216,168,79,.12);
    color: var(--gold2);
    cursor: grab;
    font-weight: 950;
}
.drag-handle:active { cursor: grabbing; }
.section-sort-item strong {
    display: block;
    margin-bottom: 4px;
}
.section-sort-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.section-sort-item em {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #f3e3c1;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
}
.item-sorter .section-sort-item {
    border-color: rgba(215,25,32,.24);
}
.hero-sort-item em {
    color: #fff;
    background: rgba(215,25,32,.22);
}
.form-note {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(216,168,79,.28);
    border-radius: 16px;
    background: rgba(216,168,79,.10);
    color: #f3e3c1;
    font-weight: 800;
}
.car2d-note {
    display: grid;
    gap: 6px;
}
.car2d-note strong {
    color: #fff;
    font-size: 16px;
}
.car2d-note span {
    color: #f3e3c1;
    line-height: 1.55;
}
.asset-help {
    display: block;
    margin-top: 8px;
    color: #f3e3c1;
}
.media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.media-actions a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(216,168,79,.28);
    border-radius: 999px;
    background: rgba(216,168,79,.10);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
.panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.panel-actions form {
    margin: 0;
}
.admin-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(233, 2, 30, .22);
    background: rgba(233, 2, 30, .08);
    color: #ffffff;
    border-radius: 8px;
}
.google-review-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}
.google-review-guide strong,
.google-review-guide span {
    display: block;
}
.google-review-guide strong {
    color: #fff;
    margin-bottom: 5px;
}
.google-review-guide span {
    color: var(--muted);
    line-height: 1.5;
}
.save-status {
    min-width: 96px;
    color: var(--gold2);
    font-size: 12px;
    font-weight: 900;
}
.save-status.error {
    color: #ff8a8a;
}
.quick-edit-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(216,168,79,.24);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(216,168,79,.12), rgba(215,25,32,.07)), rgba(255,255,255,.035);
    box-shadow: 0 20px 70px rgba(0,0,0,.2);
}
.material-editor-panel {
    gap: 18px;
}
.quick-edit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.quick-edit-head h2 {
    margin: 4px 0 6px;
    font-size: 24px;
}
.quick-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.material-groups {
    display: grid;
    gap: 16px;
}
.material-group {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}
.material-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.material-group-head strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}
.material-group-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}
.quick-card-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 240px);
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
}
.quick-card {
    scroll-snap-align: start;
    display: grid;
    gap: 9px;
    min-height: 184px;
    padding: 10px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.055);
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.quick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(216,168,79,.55);
    background: rgba(255,255,255,.08);
}
.quick-card.empty {
    place-content: center;
}
.quick-card.compact {
    min-height: 150px;
}
.quick-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}
.quick-card span:not(.quick-thumb) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.quick-thumb {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(216,168,79,.18), rgba(215,25,32,.18));
}
.quick-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.quick-thumb em {
    color: #f6d487;
    font-style: normal;
    font-weight: 950;
    text-transform: uppercase;
}
.crud-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(12px);
}
.crud-modal.open {
    display: grid;
}
.crud-modal-panel {
    position: relative;
    width: min(980px, 100%);
    max-height: min(86vh, 920px);
    overflow: auto;
    padding: 18px;
    border: 1px solid rgba(216,168,79,.28);
    border-radius: 24px;
    background: linear-gradient(180deg, #151318, #08080a);
    box-shadow: 0 36px 120px rgba(0,0,0,.56);
}
.crud-modal-close {
    position: sticky;
    top: 0;
    z-index: 2;
    margin-left: auto;
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.modal-form-head {
    margin: 0 0 14px;
}
.modal-form-head h2 {
    margin: 5px 0 6px;
    font-size: 24px;
}
.modal-crud-form {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}
.modal-loading {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--gold2);
    font-weight: 900;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.field { display: grid; gap: 8px; color: #dfe3ec; font-weight: 800; }
.field span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 13px;
    background: rgba(255,255,255,.06);
    color: #fff;
    outline: none;
}
select option { color: #111; }
input[type="checkbox"] { width: 22px; height: 22px; }
textarea { resize: vertical; }
.field small {
    color: #aeb5c4;
    font-size: 12px;
    font-weight: 700;
}
.media-field {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px dashed rgba(255,255,255,.18);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}
.media-field input[type="file"] {
    padding: 10px;
    cursor: pointer;
}
.media-preview {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.04);
}
.media-preview img,
.media-preview video {
    width: min(260px, 100%);
    max-height: 170px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}
.current-file {
    overflow-wrap: anywhere;
}
.media-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(216,168,79,.13);
    border: 1px solid rgba(216,168,79,.28);
    color: #f6d487;
    font-size: 12px;
    font-weight: 900;
}
.detail-card { padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-card div { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); }
.detail-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.detail-card strong { overflow-wrap: anywhere; }
.danger-zone { border-color: rgba(215,25,32,.45); }
.login-body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(216,168,79,.20), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(215,25,32,.16), transparent 32%),
        linear-gradient(180deg, #050506, #09090c 48%, #050506);
}
.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 18px;
    align-items: stretch;
}
.login-visual, .login-card {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: 0 34px 110px rgba(0,0,0,.34);
}
.login-visual {
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 38px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.74)),
        radial-gradient(circle at 70% 20%, rgba(216,168,79,.24), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
}
.login-visual h1 {
    max-width: 560px;
    font-size: clamp(44px, 7vw, 88px);
    margin: 8px 0 18px;
}
.login-visual p { max-width: 470px; color: #dfe3ec; font-size: 17px; }
.login-card {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}
.login-brand { border-bottom: 0; padding-bottom: 10px; }
.remember { display: flex; gap: 10px; align-items: center; color: #dfe3ec; font-weight: 800; }
.remember input { width: 18px; height: 18px; }
.login-submit { width: 100%; margin-top: 4px; }
.validation-summary {
    color: #ffb3b3;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .entity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .admin-sidebar { position: static; width: auto; margin: 12px; max-height: 260px; }
    .admin-shell { margin-left: 0; }
    .admin-topbar, .topbar-actions { align-items: flex-start; flex-direction: column; }
    .admin-hero, .panel-head { display: block; }
    .admin-button { margin-top: 14px; }
    .entity-grid, .form-grid, .detail-card { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { min-height: 320px; }
}

@media (max-width: 760px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    body.admin-body {
        background: linear-gradient(180deg, #050506, #09090c 52%, #050506);
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        width: auto;
        max-height: none;
        margin: 0;
        padding: 10px 10px 12px;
        border-width: 0 0 1px;
        border-radius: 0;
        background: rgba(5,5,6,.92);
    }

    .admin-brand {
        grid-template-columns: 42px 1fr;
        gap: 9px;
        padding: 0 0 10px;
    }

    .admin-brand span {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 13px;
    }

    .admin-brand strong {
        font-size: 15px;
    }

    .admin-brand small {
        font-size: 10px;
    }

    .admin-nav {
        display: flex;
        gap: 8px;
        margin-top: 0;
        overflow-x: auto;
        padding-bottom: 2px;
        scroll-snap-type: x mandatory;
    }

    .admin-nav::-webkit-scrollbar {
        display: none;
    }

    .admin-nav-group {
        flex: 0 0 auto;
        display: flex;
        gap: 8px;
        padding-top: 0;
        border-top: 0;
    }

    .admin-nav-group span {
        display: none;
    }

    .admin-nav a {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(255,255,255,.05);
        font-size: 12px;
        white-space: nowrap;
    }

    .admin-shell {
        margin-left: 0;
        min-height: auto;
    }

    .admin-topbar {
        position: sticky;
        top: 105px;
        z-index: 40;
        display: grid;
        gap: 10px;
        padding: 12px;
        background: rgba(5,5,6,.86);
    }

    .admin-topbar strong {
        font-size: 16px;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .topbar-actions .user-chip {
        grid-column: span 2;
        min-height: 34px;
        justify-content: center;
        font-size: 12px;
    }

    .topbar-actions form,
    .topbar-actions .admin-button {
        width: 100%;
    }

    .topbar-actions form .admin-button {
        width: 100%;
    }

    .admin-main {
        padding: 14px 10px 30px;
    }

    .admin-hero,
    .panel-head {
        padding: 18px;
        margin-bottom: 14px;
        border-radius: 20px;
    }

    h1 {
        font-size: 31px;
        letter-spacing: -1px;
    }

    p {
        font-size: 13px;
        line-height: 1.5;
    }

    .admin-button {
        width: 100%;
        min-height: 40px;
        margin-top: 10px;
        border-radius: 12px;
        font-size: 13px;
    }

    .entity-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .entity-card {
        min-height: 106px;
        padding: 16px;
        border-radius: 18px;
    }

    .entity-card strong {
        font-size: 18px;
    }

    .table-card {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .admin-table {
        min-width: 0;
        display: block;
        width: 100%;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody {
        display: grid;
        gap: 10px;
    }

    .admin-table tr {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    }

    .admin-table td {
        display: grid;
        grid-template-columns: minmax(92px, 36%) 1fr;
        gap: 10px;
        align-items: start;
        padding: 0;
        border-bottom: 0;
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .admin-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .5px;
    }

    .row-actions {
        display: flex !important;
        grid-template-columns: none !important;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 6px !important;
    }

    .row-actions::before {
        width: 100%;
    }

    .row-actions a {
        min-height: 34px;
        align-items: center;
        padding: 0 10px;
        margin-right: 0;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(255,255,255,.06);
        font-size: 12px;
    }

    .form-card,
    .detail-card {
        padding: 14px;
        border-radius: 18px;
    }

    .form-grid,
    .detail-card {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .field {
        gap: 7px;
    }

    .field span {
        font-size: 11px;
    }

    input,
    textarea,
    select {
        min-height: 42px;
        padding: 10px 11px;
        border-radius: 12px;
        font-size: 14px;
    }

    input[type="checkbox"] {
        width: 24px;
        height: 24px;
        min-height: 24px;
    }

    textarea {
        min-height: 96px;
    }

    .media-field,
    .media-preview {
        padding: 9px;
        border-radius: 14px;
    }

    .media-preview img,
    .media-preview video {
        width: 100%;
        max-height: 220px;
    }

    .detail-card div {
        padding: 12px;
        border-radius: 14px;
    }

    .login-body {
        padding: 12px;
        place-items: stretch;
    }

    .login-shell {
        min-height: calc(100vh - 24px);
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .login-visual {
        min-height: 220px;
        padding: 22px;
        border-radius: 22px;
    }

    .login-visual h1 {
        font-size: 40px;
        margin: 6px 0 10px;
    }

    .login-visual p {
        font-size: 14px;
    }

    .login-card {
        padding: 18px;
        border-radius: 22px;
    }
}

@media (max-width: 380px) {
    .admin-topbar {
        top: 101px;
    }

    .admin-nav a {
        font-size: 11px;
        padding: 9px 10px;
    }

    .admin-table td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    h1 {
        font-size: 28px;
    }
}

.form-sections {
    display: grid;
    gap: 18px;
}

.form-section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.03);
}

.form-section-head {
    margin-bottom: 14px;
}

.form-section-head h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.form-section-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 13px;
}

.settings-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.04);
}

.toggle-field span {
    font-size: 13px;
    color: var(--soft);
}

@media (max-width: 900px) {
    .quick-edit-head {
        display: grid;
    }

    .quick-actions,
    .material-group-head {
        display: grid;
        align-items: stretch;
    }

    .quick-card-row {
        grid-auto-columns: minmax(170px, 78vw);
    }

    .crud-modal {
        padding: 10px;
    }

    .crud-modal-panel {
        max-height: 92vh;
        padding: 12px;
        border-radius: 18px;
    }

    .design-workspace {
        grid-template-columns: 1fr;
    }

    .design-form {
        max-height: none;
    }

    .design-preview {
        position: static;
        min-height: 520px;
    }

    .preview-device-frame {
        height: 520px;
    }

    .preview-toolbar {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .settings-form .form-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 14px;
        border-radius: 18px;
    }
}
