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

:root {
    --ink: #263044;
    --muted: #697386;
    --paper: #ffffff;
    --line: #e6edf5;
    --bg: #f7fbff;
    --pink: #ff6f9f;
    --coral: #ff8a65;
    --mint: #48c9b0;
    --sky: #55a7f7;
    --violet: #8a7cf6;
    --lemon: #ffd166;
    --danger: #e5486d;
    --radius: 8px;
    --shadow: 0 18px 44px rgba(38, 48, 68, 0.1);
    --soft-shadow: 0 10px 26px rgba(38, 48, 68, 0.08);
}

@media (max-width: 1180px) {
    .builder-hero,
    .builder-status-grid,
    .builder-column-grid,
    .builder-tool-grid,
    .builder-library-grid {
        grid-template-columns: 1fr 1fr;
    }

    .builder-hero {
        align-items: start;
    }
}

@media (max-width: 760px) {
    .builder-hero,
    .builder-status-grid,
    .builder-column-grid,
    .builder-tool-grid,
    .builder-library-grid {
        grid-template-columns: 1fr;
    }

    .builder-hero {
        gap: 16px;
    }

    .builder-hero h2 {
        font-size: clamp(1.52rem, 8vw, 2.05rem);
    }

    .builder-hero-actions {
        justify-content: stretch;
    }

    .builder-hero-actions .admin-button {
        width: 100%;
        justify-content: center;
    }

    .builder-tool-card {
        min-height: 0;
    }

    .builder-column-card,
    .builder-tool-card,
    .builder-library-card {
        border-radius: 18px;
    }
}

/* CMS Studio shell v3: rebuild the admin navigation model */
body.admin-studio-shell {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #eef4fb 0%, #f7fafc 48%, #f3f7fb 100%) !important;
    color: #17223a !important;
}

body.admin-studio-shell .admin-mobile-header {
    display: none !important;
}

body.admin-studio-shell .admin-command-rail {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 16px !important;
    width: 132px !important;
    height: 100vh !important;
    padding: 18px 12px !important;
    overflow-y: auto !important;
    background:
        linear-gradient(180deg, #07111f 0%, #0d1728 58%, #111827 100%) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: 18px 0 46px rgba(15, 23, 42, 0.18) !important;
}

.admin-rail-brand {
    display: grid;
    justify-items: center;
    gap: 7px;
    color: #f8fafc;
    text-decoration: none;
}

.admin-rail-brand span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: #fff;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff7aa6 0%, #ffe070 52%, #6ad7f6 100%);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    font-weight: 900;
}

.admin-rail-brand small {
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.admin-rail-nav {
    display: grid;
    align-content: start;
    gap: 10px;
}

.admin-rail-nav a {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    min-height: 84px;
    padding: 10px 6px;
    color: #b9c6d8;
    border: 1px solid transparent;
    border-radius: 20px;
    background: transparent;
    text-align: center;
    text-decoration: none;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.admin-rail-nav a:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(147, 197, 253, 0.22);
}

.admin-rail-nav a.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(79, 70, 229, 0.9));
    border-color: rgba(191, 219, 254, 0.45);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.admin-rail-nav a svg {
    width: 24px;
    height: 24px;
    color: currentColor;
}

.admin-rail-nav a span {
    display: -webkit-box;
    max-width: 96px;
    min-height: 2.4em;
    overflow: hidden;
    color: currentColor;
    font-size: 0.74rem;
    font-weight: 900;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.admin-rail-nav a b {
    position: absolute;
    top: 8px;
    right: 9px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    color: #07111f;
    border-radius: 999px;
    background: #e0f2fe;
    font-size: 0.68rem;
    font-weight: 900;
}

.admin-rail-user {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto;
    color: #bfdbfe;
    border: 1px solid rgba(147, 197, 253, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
}

.admin-rail-user svg {
    width: 23px;
    height: 23px;
}

body.admin-studio-shell .admin-main {
    min-width: 0 !important;
    padding: 24px clamp(18px, 2.4vw, 36px) 44px !important;
}

body.admin-studio-shell .admin-main > :not(.admin-modal):not(.image-crop-modal):not(.admin-menu-backdrop) {
    max-width: 1620px !important;
}

.admin-studio-topbar {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.15fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    margin: 0 auto 14px;
    border: 1px solid #dbe5f1;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.08);
}

.admin-studio-title {
    min-width: 0;
}

.admin-studio-title span {
    display: block;
    color: #d94f7e;
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1.2;
}

.admin-studio-title h1 {
    margin: 2px 0;
    color: #17223a;
    font-size: clamp(1.65rem, 2vw, 2.25rem);
    line-height: 1.08;
}

.admin-studio-title p {
    margin: 0;
    color: #66758c;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.35;
}

.admin-command-search {
    position: relative;
    min-width: 0;
}

.admin-command-search label {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #dbe5f1;
    border-radius: 16px;
    background: #f8fbff;
}

.admin-command-search svg {
    width: 20px;
    height: 20px;
    color: #60a5fa;
}

.admin-command-search input {
    width: 100%;
    min-width: 0;
    height: 48px;
    color: #17223a;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
}

.admin-command-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 60;
    display: grid;
    gap: 6px;
    max-height: min(420px, 70vh);
    padding: 10px;
    overflow-y: auto;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.admin-command-results[hidden] {
    display: none !important;
}

.admin-command-results a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 8px;
    color: #17223a;
    border-radius: 13px;
    text-decoration: none;
}

.admin-command-results a:hover {
    background: #eff6ff;
}

.admin-command-results a > svg {
    width: 36px;
    height: 36px;
    padding: 9px;
    color: #2563eb;
    border-radius: 12px;
    background: #eff6ff;
}

.admin-command-results strong,
.admin-command-results small {
    display: block;
}

.admin-command-results strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.admin-command-results small {
    margin-top: 2px;
    color: #66758c;
    font-size: 0.74rem;
    font-weight: 800;
}

.admin-studio-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    justify-content: flex-end;
}

.admin-studio-actions .ghost-button {
    min-height: 46px;
    white-space: nowrap;
}

.admin-context-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    margin: 0 auto 18px;
    border: 1px solid #dbe5f1;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.admin-context-nav > div {
    display: grid;
    gap: 2px;
    min-width: 150px;
}

.admin-context-nav > div span {
    color: #d94f7e;
    font-size: 0.72rem;
    font-weight: 900;
}

.admin-context-nav > div strong {
    color: #17223a;
    font-size: 0.94rem;
    font-weight: 900;
}

.admin-context-nav nav {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
}

.admin-context-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 13px;
    color: #475569;
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    background: #fff;
    font-size: 0.84rem;
    font-weight: 900;
    text-decoration: none;
}

.admin-context-nav a:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.admin-context-nav a.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.18);
}

.admin-context-nav a svg {
    width: 17px;
    height: 17px;
}

body.admin-studio-shell .cms-studio-hero {
    display: none !important;
}

body.admin-studio-shell .cms-studio-metrics {
    margin-top: 0 !important;
}

body.admin-studio-shell .cms-studio-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) !important;
}

body.admin-studio-shell .cms-inspector {
    grid-column: 1 / -1 !important;
    position: static !important;
}

body.admin-studio-shell .cms-system-pages {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell {
        display: block !important;
        padding-top: 72px !important;
    }

    body.admin-studio-shell .admin-mobile-header {
        display: flex !important;
    }

    body.admin-studio-shell .admin-command-rail {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 80 !important;
        width: min(86vw, 360px) !important;
        height: 100vh !important;
        padding: 86px 18px 22px !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
    }

    body.admin-menu-open.admin-studio-shell .admin-command-rail {
        transform: translateX(0) !important;
    }

    .admin-rail-brand {
        display: none !important;
    }

    .admin-rail-nav a {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        justify-items: start;
        min-height: 58px;
        padding: 9px 12px;
        text-align: left;
    }

    .admin-rail-nav a span {
        max-width: none;
        min-height: 0;
        font-size: 0.9rem;
        -webkit-line-clamp: 1;
    }

    .admin-rail-nav a b {
        position: static;
    }

    .admin-rail-nav a svg {
        justify-self: center;
    }

    .admin-rail-user {
        display: none;
    }

    .admin-studio-topbar {
        grid-template-columns: 1fr;
    }

    .admin-studio-actions {
        justify-content: stretch;
    }

    .admin-studio-actions .ghost-button {
        flex: 1 1 0;
        justify-content: center;
    }

    .admin-context-nav {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .cms-studio-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-main {
        padding: 14px 12px 28px !important;
    }

    .admin-studio-topbar {
        padding: 15px;
        border-radius: 20px;
    }

    .admin-studio-title h1 {
        font-size: 1.55rem;
    }

    .admin-studio-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-context-nav nav {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .admin-context-nav a {
        justify-content: center;
        width: 100%;
    }
}

/* Admin UX system overhaul: compact navigation, filtering, and drag ordering */
body.admin-shell {
    grid-template-columns: 286px minmax(0, 1fr);
    background:
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%),
        #f4f7fb;
}

.admin-main {
    padding: 24px clamp(20px, 2.4vw, 36px) 40px;
}

.admin-sidebar {
    gap: 14px;
    padding: 18px 16px;
}

.admin-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    padding-bottom: 14px;
}

.admin-brand span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.28rem;
}

.admin-brand strong {
    font-size: 1rem;
}

.admin-brand small {
    font-size: 0.76rem;
}

.admin-user {
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 13px;
}

.admin-user svg {
    width: 18px;
    height: 18px;
}

.admin-user strong {
    font-size: 0.9rem;
}

.admin-user small {
    font-size: 0.78rem;
}

.admin-nav-search {
    position: relative;
    display: block;
}

.admin-nav-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    color: #93a4bb;
    transform: translateY(-50%);
}

.admin-nav-search input {
    width: 100%;
    min-height: 40px;
    padding: 0 12px 0 36px;
    color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.14);
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.88rem;
    font-weight: 800;
}

.admin-nav-search input::placeholder {
    color: #8ea0b7;
}

.admin-nav-search input:focus {
    border-color: rgba(147, 197, 253, 0.72);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.admin-nav {
    gap: 7px;
}

.admin-nav-group {
    border-radius: 12px;
    background: transparent;
    border-color: transparent;
}

.admin-nav-group.is-current,
.admin-nav-group[open] {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.055);
}

.admin-nav-group summary {
    min-height: 44px;
    padding: 7px 8px;
    border-radius: 11px;
}

.admin-nav-group summary:hover {
    background: rgba(255, 255, 255, 0.075);
}

.nav-group-title {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
}

.nav-group-title > svg {
    width: 28px;
    height: 28px;
    padding: 6px;
    border-radius: 9px;
}

.nav-group-title strong {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar .nav-group-title small {
    display: none;
}

.nav-group-meta {
    gap: 4px;
    font-size: 0.76rem;
}

.nav-group-meta svg {
    width: 14px;
    height: 14px;
}

.admin-nav .admin-nav-links {
    gap: 2px;
    padding: 2px 6px 8px 37px;
}

.admin-nav .admin-nav-links a {
    min-height: 32px;
    padding: 0 8px;
    border-radius: 9px;
    font-size: 0.84rem;
}

.admin-nav .admin-nav-links a svg {
    width: 15px;
    height: 15px;
}

.admin-nav-group[hidden],
.admin-nav .admin-nav-links a[hidden],
[data-content-row][hidden] {
    display: none !important;
}

.admin-topbar,
.builder-command-bar,
.admin-panel,
.metric-card,
.module-section-card,
.content-list-panel {
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.admin-topbar,
.builder-command-bar {
    padding: 18px 22px;
}

.admin-topbar h1,
.builder-command-bar h2 {
    font-size: clamp(1.58rem, 1.7vw, 2.08rem);
}

.panel-kicker,
.admin-topbar span {
    font-size: 0.82rem;
}

.content-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px 18px;
}

.content-toolbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

.content-toolbar-icon svg {
    width: 18px;
    height: 18px;
}

.content-toolbar-copy {
    grid-template-columns: 36px minmax(0, 1fr);
}

.content-toolbar-copy p {
    max-width: 760px;
    font-size: 0.88rem;
}

.content-toolbar-actions .admin-button {
    min-height: 40px;
    border-radius: 11px;
}

.content-count-chip {
    min-height: 36px;
    border-radius: 11px;
    font-size: 0.86rem;
}

.content-toolbelt {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--admin-line);
    background: #f8fafc;
}

.content-search-box {
    position: relative;
    min-width: 0;
}

.content-search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 17px;
    height: 17px;
    color: #64748b;
    transform: translateY(-50%);
}

.content-search-box input {
    width: 100%;
    min-height: 42px;
    padding: 0 14px 0 40px;
    color: var(--admin-ink);
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font-weight: 800;
}

.content-search-box input:focus,
.content-filter-select select:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.content-filter-select {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 0.74rem;
    font-weight: 900;
}

.content-filter-select select {
    min-height: 42px;
    padding: 0 34px 0 12px;
    color: var(--admin-ink);
    border: 1px solid var(--admin-line);
    border-radius: 11px;
    outline: none;
    background: #fff;
    font-weight: 850;
}

.content-visible-count,
.content-sort-hint {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    color: #475569;
    border: 1px solid var(--admin-line);
    border-radius: 999px;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.content-sort-hint {
    grid-column: 1 / -1;
    width: fit-content;
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.content-sort-hint svg {
    width: 16px;
    height: 16px;
}

.content-list-panel .table-wrap {
    padding: 0;
}

.content-list-panel .admin-table {
    min-width: 920px;
}

.content-list-panel .admin-table th,
.content-list-panel .admin-table td {
    padding: 12px 14px;
}

.content-list-panel .admin-table th {
    background: #f8fafc;
}

.drag-col {
    width: 82px;
}

.drag-cell {
    width: 82px;
}

.drag-handle {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    cursor: grab;
    vertical-align: middle;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle svg {
    width: 18px;
    height: 18px;
}

.builder-drag-handle {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

.builder-page-card > div .builder-drag-handle {
    order: -1;
}

.builder-block-actions .builder-drag-handle {
    margin-right: 2px;
}

.drag-order {
    margin-left: 7px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 900;
}

[data-sortable-row] {
    cursor: grab;
}

[data-sortable-row].is-dragging {
    opacity: 0.58;
}

[data-sortable-list].is-saving-sort {
    cursor: wait;
}

.is-sortable-table tbody tr:hover td {
    background: #f8fbff;
}

.content-list-panel.has-no-filter-results .table-wrap::after {
    content: "ไม่พบข้อมูลตามเงื่อนไขที่ค้นหา";
    display: grid;
    place-items: center;
    margin: 18px;
    min-height: 90px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    font-weight: 900;
}

.admin-mini-toast {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 220;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    color: #fff;
    border-radius: 12px;
    background: #0f172a;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
    font-size: 0.92rem;
    font-weight: 900;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-mini-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.admin-mini-toast.is-error {
    background: #be123c;
}

.admin-upload-progress {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    backdrop-filter: blur(8px);
}

.admin-upload-progress.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.admin-upload-progress-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: min(520px, 100%);
    padding: 22px;
    color: #17233f;
    border: 1px solid #cfe0ff;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.admin-upload-progress-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.admin-upload-progress-icon svg {
    width: 25px;
    height: 25px;
}

.admin-upload-progress-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-upload-progress-copy strong {
    font-size: 1.05rem;
    font-weight: 1000;
}

.admin-upload-progress-copy small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-upload-progress-card > b {
    color: #2563eb;
    font-size: 1.08rem;
    font-weight: 1000;
}

.admin-upload-progress-track {
    grid-column: 1 / -1;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
}

.admin-upload-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    transition: width 0.18s ease;
}

@media (max-width: 640px) {
    .admin-upload-progress-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 18px;
    }

    .admin-upload-progress-card > b {
        grid-column: 1 / -1;
    }

    .admin-upload-progress-copy small {
        white-space: normal;
    }
}

@media (max-width: 1180px) {
    body.admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-nav-search {
        display: block;
    }
}

@media (max-width: 860px) {
    .content-toolbelt {
        grid-template-columns: 1fr;
    }

    .content-visible-count,
    .content-sort-hint {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 760px) {
    .admin-sidebar {
        width: min(88vw, 330px);
        padding: 14px;
    }

    .admin-nav .admin-nav-links {
        padding-left: 34px;
    }

    .content-toolbelt {
        padding: 12px 14px;
    }

    .drag-col,
    .drag-cell {
        width: auto;
    }

    .drag-cell {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    .content-list-panel .admin-table td.drag-cell::before {
        content: "ลากเรียง";
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Sarabun", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 244, 248, 0.72), rgba(241, 248, 255, 0.8) 44%, #f8fff7),
        var(--bg);
    line-height: 1.65;
    letter-spacing: 0;
}

body.modal-open {
    overflow: hidden;
}

body.admin-menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
}

.admin-mobile-header,
.admin-menu-backdrop {
    display: none;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px;
    color: #fff;
    background: #263044;
    overflow-y: auto;
}

.admin-brand {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 12px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-brand span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--pink), var(--sky));
    font-size: 1.5rem;
    font-weight: 800;
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand strong {
    font-size: 1.12rem;
}

.admin-brand small,
.admin-user small {
    color: rgba(255, 255, 255, 0.64);
}

.admin-user {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
}

.admin-user svg {
    flex: 0 0 22px;
    color: var(--lemon);
}

.admin-user strong,
.admin-user small {
    display: block;
    overflow-wrap: anywhere;
}

.admin-nav {
    display: grid;
    gap: 6px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.78);
    border-radius: var(--radius);
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.admin-nav svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.admin-main {
    min-width: 0;
    padding: 28px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-topbar span,
.panel-kicker {
    color: var(--pink);
    font-weight: 800;
    font-size: 0.86rem;
}

.admin-topbar h1,
.panel-heading h2,
.metric-card h2,
.login-card h2,
.login-hero h1 {
    margin: 4px 0 0;
    line-height: 1.2;
}

.admin-topbar h1 {
    font-size: 2rem;
}

.topbar-actions,
.metric-actions,
.message-actions,
.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-button,
.ghost-button,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    border: 0;
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-button {
    padding: 0 16px;
}

.admin-button svg,
.ghost-button svg,
.icon-button svg {
    width: 17px;
    height: 17px;
}

.admin-button:hover,
.ghost-button:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.admin-button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--pink), var(--coral));
    box-shadow: 0 12px 24px rgba(255, 111, 159, 0.25);
}

.admin-button.soft,
.ghost-button {
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
}

.admin-button.danger,
.ghost-button.danger,
.icon-button.danger {
    color: #fff;
    background: var(--danger);
}

.ghost-button {
    min-height: 40px;
    padding: 0 14px;
}

.icon-button {
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: #f5f8fc;
    border: 1px solid var(--line);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 220px;
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card,
.admin-panel,
.module-card,
.message-card,
.admin-tip,
.login-card,
.login-hero {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.metric-card {
    min-height: 170px;
    padding: 22px;
}

.hero-metric {
    background:
        linear-gradient(135deg, rgba(255, 244, 248, 0.98), rgba(241, 248, 255, 0.98)),
        #fff;
}

.hero-metric p {
    max-width: 760px;
    color: var(--muted);
}

.metric-card:not(.hero-metric) {
    display: grid;
    align-content: center;
    gap: 8px;
}

.metric-card:not(.hero-metric) svg {
    color: var(--sky);
    width: 28px;
    height: 28px;
}

.metric-card strong {
    font-size: 2rem;
    line-height: 1.1;
}

.metric-card span {
    color: var(--muted);
}

.accent-pink {
    border-color: #ffd1df;
}

.accent-mint {
    border-color: #bcefe0;
}

.admin-panel {
    padding: 22px;
    margin-bottom: 18px;
}

.panel-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-heading.compact {
    margin-bottom: 10px;
}

.panel-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.module-card {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.module-card:hover {
    transform: translateY(-3px);
    border-color: rgba(85, 167, 247, 0.34);
    box-shadow: var(--shadow);
}

.module-card svg {
    width: 42px;
    height: 42px;
    padding: 10px;
    color: #fff;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--mint), var(--sky));
}

.module-card strong,
.module-card span {
    display: block;
}

.module-card span {
    color: var(--muted);
    font-size: 0.9rem;
}

.module-card b {
    color: var(--pink);
    font-size: 1.2rem;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
}

.admin-tip {
    padding: 24px;
    background: linear-gradient(160deg, #263044, #35405a);
    color: #fff;
}

.admin-tip svg {
    color: var(--lemon);
}

.admin-tip p {
    color: rgba(255, 255, 255, 0.76);
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 18px;
    align-items: start;
}

.editor-panel {
    position: sticky;
    top: 28px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.content-panel {
    min-height: 560px;
}

.admin-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

.admin-table th {
    color: #43506a;
    font-size: 0.9rem;
    background: #f8fbff;
}

.admin-table td {
    color: #3d485f;
}

.admin-table tr.is-child-menu-row td {
    background: #fbfdff;
}

.admin-table tr.is-child-menu-row td:nth-child(2) {
    padding-left: 28px;
}

.admin-thumb {
    display: inline-flex;
    width: 48px;
    height: 36px;
    padding: 2px;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(70, 86, 116, 0.07);
}

.admin-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
}

.muted-text {
    color: var(--muted);
    font-size: 0.88rem;
}

.actions-col {
    width: 180px;
}

.table-actions form,
.message-actions form {
    margin: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 800;
}

.pill.ok,
.pill.new {
    color: #0b614e;
    background: #e9fff8;
}

.pill.muted {
    color: #697386;
    background: #eef3f8;
}

.color-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    color: #43506a;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-size: 0.86rem;
    font-weight: 800;
}

.color-chip b {
    display: block;
    width: 16px;
    height: 16px;
    border: 1px solid rgba(36, 48, 74, 0.12);
    border-radius: 5px;
    background: var(--chip-color, #43a7ff);
}

.file-link,
.current-file-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fff;
    font-size: 0.86rem;
    font-weight: 800;
}

.file-link svg,
.current-file-link svg {
    width: 15px;
    height: 15px;
    color: var(--sky);
}

.admin-file-table-list {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    max-width: 320px;
}

.admin-file-table-list .file-link {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    max-width: 210px;
    min-width: 0;
}

.admin-file-table-list .file-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-file-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    color: #2459c4;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #eef5ff;
    font-size: 0.86rem;
    font-weight: 900;
}

.admin-file-upload-panel {
    display: grid;
    gap: 11px;
    padding: 12px;
    border: 1px solid rgba(210, 224, 240, 0.95);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.official-drive-link-editor {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dce8f6;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(236, 244, 255, 0.92), rgba(255, 247, 251, 0.82)),
        #ffffff;
}

.official-drive-link-list {
    display: grid;
    gap: 10px;
}

.official-drive-link-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dbe7f6;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 35, 59, 0.045);
}

.official-drive-link-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #2459c4;
    border: 1px solid #cfe0ff;
    border-radius: 12px;
    background: #f0f6ff;
}

.official-drive-link-row label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.official-drive-link-row label span {
    color: #65728a;
    font-size: 0.8rem;
    font-weight: 850;
}

.official-drive-link-row input {
    min-height: 42px;
}

.official-drive-link-row .icon-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
}

@media (max-width: 720px) {
    .official-drive-link-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .official-drive-link-row .icon-button {
        grid-column: 2;
        justify-self: end;
    }
}

.admin-file-list,
.admin-file-upload-stack {
    display: grid;
    gap: 8px;
}

.admin-file-item {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 9px 44px 9px 10px;
    border: 1px solid #dce7f5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(23, 35, 59, 0.045);
}

.admin-file-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #2459c4;
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    background: #f2f7ff;
}

.admin-file-icon svg {
    width: 19px;
    height: 19px;
}

.admin-file-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.admin-file-meta strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-file-meta small {
    color: #6a7891;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
}

.admin-file-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.admin-file-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.admin-file-upload-row input[type="file"] {
    width: 100%;
}

.admin-file-upload-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.add-file-upload-button {
    color: #2459c4;
    border-color: #bfd7ff;
    background: #f4f8ff;
}

.add-file-upload-button svg {
    width: 16px;
    height: 16px;
}

.add-file-upload-button.is-disabled,
.add-file-upload-button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.icon-button.subtle {
    color: #71809b;
    border-color: #dbe6f5;
    background: #f8fbff;
}

.icon-button.subtle:hover,
.icon-button.subtle:focus-visible {
    color: #d9295e;
    border-color: rgba(217, 41, 94, 0.32);
    background: #fff5f8;
}

.parent-menu-label,
.icon-preview-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 10px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fff;
    font-size: 0.84rem;
    font-weight: 800;
}

.icon-preview-chip svg {
    width: 16px;
    height: 16px;
    color: var(--pink);
}

.admin-form {
    display: grid;
    gap: 14px;
}

.admin-form label,
.admin-form .admin-field {
    display: grid;
    gap: 7px;
    color: #3b465f;
    font-weight: 800;
}

.admin-form .admin-field[hidden] {
    display: none !important;
}

.admin-form label b,
.admin-form .admin-field > b {
    color: var(--danger);
}

.field-help {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 11px 12px;
    color: var(--ink);
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fbfdff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-form input[type="file"] {
    padding: 9px;
    cursor: pointer;
}

.admin-form input[type="color"] {
    width: 64px;
    min-width: 64px;
    height: 46px;
    padding: 4px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.admin-form input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.admin-form input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 10px;
}

.admin-form input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 10px;
}

.admin-form textarea {
    resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: var(--sky);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(85, 167, 247, 0.14);
}

.field-hint {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.color-picker-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.color-picker-preview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid #dce5ef;
    border-radius: 14px;
    background: #fff;
    font-weight: 900;
}

.color-picker-preview b {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: var(--selected-color, #3fb8af);
    box-shadow: 0 0 0 1px rgba(36, 48, 74, 0.14), 0 8px 16px rgba(54, 72, 110, 0.12);
}

.color-picker-preview code {
    color: #43506a;
    font-family: "Sarabun", system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 900;
}

.admin-image-preview {
    position: relative;
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 8px;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 6px 8px 6px 6px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fff;
}

.image-remove-card {
    cursor: default;
}

.image-remove-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.remove-image-button {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: #d9295e;
    border: 1px solid rgba(217, 41, 94, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(67, 80, 106, 0.18);
    cursor: pointer;
    line-height: 1;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.remove-image-button:hover,
.remove-image-button:focus-visible {
    transform: translateY(-1px);
    color: #fff;
    border-color: #d9295e;
    background: #d9295e;
    outline: none;
}

.remove-image-button svg {
    width: 15px;
    height: 15px;
    stroke-width: 3;
    pointer-events: none;
}

.image-remove-card.is-removed {
    opacity: 0.42;
    filter: grayscale(0.85);
}

.image-remove-card.is-hidden {
    display: none;
}

.image-remove-card.is-removed .remove-image-button {
    color: #fff;
    border-color: #d9295e;
    background: #d9295e;
}

.image-remove-card.is-removed::after {
    content: "รอลบ";
    position: absolute;
    inset: auto 6px 6px;
    display: grid;
    place-items: center;
    min-height: 22px;
    color: #fff;
    border-radius: 999px;
    background: rgba(229, 72, 109, 0.86);
    font-size: 0.78rem;
    font-weight: 900;
}

.image-remove-notice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    padding: 9px 12px;
    color: #2f6a4f;
    border: 1px solid rgba(112, 210, 168, 0.5);
    border-radius: var(--radius);
    background: #f1fff8;
    font-size: 0.88rem;
    font-weight: 800;
}

.image-remove-notice svg {
    width: 17px;
    height: 17px;
    color: #35a878;
}

.image-remove-notice button {
    padding: 0;
    color: #d9295e;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.admin-image-preview img {
    width: 58px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.admin-image-preview span {
    font-size: 0.84rem;
    font-weight: 800;
}

.admin-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 7px;
    max-width: 360px;
}

.admin-gallery-preview a,
.gallery-image-card {
    position: relative;
    display: block;
    overflow: hidden;
    width: 54px;
    height: 42px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #fff;
}

.admin-gallery-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.selected-upload-panel {
    display: grid;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dbe6f5;
    border-radius: 14px;
    background: #f8fbff;
}

.selected-upload-panel[hidden] {
    display: none;
}

.selected-upload-panel.has-error {
    border-color: rgba(217, 41, 94, 0.34);
    background: #fff7fa;
}

.selected-upload-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #263044;
    font-size: 0.9rem;
    font-weight: 900;
}

.selected-upload-warning {
    padding: 8px 10px;
    color: #a10f38;
    border: 1px solid rgba(217, 41, 94, 0.24);
    border-radius: 10px;
    background: #fff0f5;
    font-size: 0.84rem;
    font-weight: 900;
}

.selected-upload-list {
    display: grid;
    gap: 8px;
    max-height: 270px;
    overflow: auto;
    padding-right: 2px;
}

.selected-upload-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #fff;
}

.selected-upload-item.is-error {
    border-color: rgba(217, 41, 94, 0.28);
    background: #fff8fa;
}

.selected-upload-thumb {
    display: grid;
    place-items: center;
    width: 48px;
    height: 38px;
    overflow: hidden;
    color: #5b8def;
    border-radius: 9px;
    background: #edf4ff;
}

.selected-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-upload-thumb svg {
    width: 18px;
    height: 18px;
}

.selected-upload-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.selected-upload-meta strong,
.selected-upload-meta small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-upload-meta strong {
    color: #263044;
    font-size: 0.88rem;
    font-weight: 900;
}

.selected-upload-meta small {
    color: #697891;
    font-size: 0.78rem;
    font-weight: 800;
}

.selected-upload-item.is-error .selected-upload-meta small {
    color: #be123c;
}

.selected-upload-remove {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #d9295e;
    border: 1px solid rgba(217, 41, 94, 0.24);
    border-radius: 999px;
    background: #fff7fa;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.selected-upload-remove:hover,
.selected-upload-remove:focus-visible {
    transform: translateY(-1px);
    color: #fff;
    border-color: #d9295e;
    background: #d9295e;
    outline: none;
}

.selected-upload-remove svg {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.ghost-button.small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.86rem;
}

.danger-text {
    color: var(--danger);
}

.link-picker {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fbfdff;
}

.link-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.link-test-button {
    min-width: 116px;
    justify-content: center;
    white-space: nowrap;
}

.link-test-button.is-disabled {
    opacity: 0.48;
    pointer-events: none;
}

.admin-url-picker {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(255, 247, 251, 0.78));
}

.admin-url-picker-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.15fr) minmax(240px, 1.15fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-url-picker-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.admin-url-picker-grid label > span {
    font-size: 0.88rem;
    font-weight: 800;
    color: #64748b;
}

.admin-url-picker [hidden] {
    display: none !important;
}

.admin-url-picker .link-test-button {
    min-height: 46px;
}

.admin-url-picker--compact {
    padding: 12px;
    border-radius: 16px;
}

.admin-url-picker--compact .admin-url-picker-grid {
    grid-template-columns: minmax(120px, 0.78fr) minmax(190px, 1.22fr);
}

@media (max-width: 900px) {
    .admin-url-picker-grid,
    .admin-url-picker--compact .admin-url-picker-grid {
        grid-template-columns: 1fr;
    }
}

.icon-picker {
    display: grid;
    gap: 14px;
    padding: 12px;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fbfdff;
}

.icon-picker-current {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.icon-picker-current span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.icon-picker-current svg {
    width: 20px;
    height: 20px;
    color: var(--pink);
}

.icon-picker-group {
    display: grid;
    gap: 8px;
}

.icon-picker-group > strong {
    color: #43506a;
    font-size: 0.9rem;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.icon-choice {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    min-height: 72px;
    padding: 8px 6px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.icon-choice:hover,
.icon-choice.is-selected {
    transform: translateY(-1px);
    color: var(--ink);
    border-color: rgba(255, 111, 159, 0.42);
    background: #fff7fb;
}

.icon-choice svg {
    width: 23px;
    height: 23px;
    color: var(--sky);
}

.icon-choice.is-selected svg {
    color: var(--pink);
}

.icon-choice span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkbox-label {
    grid-template-columns: 22px 1fr;
    align-items: center;
}

.compact-check {
    display: inline-grid;
    grid-template-columns: 18px 1fr;
    width: max-content;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.compact-check input {
    width: 16px;
    height: 16px;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--pink);
}

.form-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-two-columns .wide {
    grid-column: 1 / -1;
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: none;
    padding: 28px;
}

.admin-modal.is-open {
    display: grid;
    place-items: center;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(36, 48, 74, 0.46);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.admin-modal-card {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100vw - 34px));
    max-height: calc(100vh - 44px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 30px 80px rgba(36, 48, 74, 0.26);
}

.admin-modal-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 242, 248, 0.92), rgba(238, 253, 255, 0.92)),
        #fff;
}

.admin-modal-head h2 {
    margin: 2px 0 0;
}

.admin-modal-form {
    min-height: 0;
    overflow: auto;
    padding: 20px 22px 22px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.admin-form-grid .wide {
    grid-column: 1 / -1;
}

.admin-modal-actions {
    position: sticky;
    bottom: -22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 18px -22px -22px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
}

.cropped-preview {
    min-height: 78px;
    border: 1px dashed #b8d7f5;
    border-radius: var(--radius);
    background: #f7fbff center / cover no-repeat;
}

.image-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 330;
    display: none;
    place-items: center;
    padding: 22px;
}

.image-crop-modal.is-open {
    display: grid;
}

.image-crop-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(36, 48, 74, 0.56);
    backdrop-filter: blur(9px);
}

.image-crop-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    width: min(860px, calc(100vw - 32px));
    max-height: calc(100svh - 32px);
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(231, 237, 247, 0.96);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 242, 248, 0.96), rgba(238, 253, 255, 0.96)),
        #fff;
    box-shadow: 0 30px 80px rgba(36, 48, 74, 0.3);
}

.image-crop-card header,
.image-crop-card footer {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.image-crop-card h2 {
    margin: 2px 0 0;
    color: var(--ink);
}

.image-crop-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.image-crop-stage-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 980px);
    min-height: 0;
    margin-right: auto;
    margin-left: auto;
    padding: 10px;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 16px;
    background: #fff;
}

.image-crop-stage-wrap.is-portrait {
    width: min(100%, 480px);
}

.image-crop-stage-wrap.is-square {
    width: min(100%, 620px);
}

.image-crop-stage-wrap.is-landscape {
    width: min(100%, 980px);
}

.image-crop-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    color: #52637b;
    font-size: 0.86rem;
    font-weight: 850;
}

.image-crop-meta span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
}

.image-crop-meta strong {
    color: var(--ink);
}

.image-crop-stage-wrap canvas {
    display: block;
    width: auto;
    height: auto;
    aspect-ratio: var(--crop-aspect-ratio, auto);
    max-width: 100%;
    max-height: min(48svh, 560px);
    margin: 0 auto;
    border-radius: 12px;
    background: #eef4fb;
    cursor: grab;
    touch-action: none;
}

.image-crop-stage-wrap canvas:active {
    cursor: grabbing;
}

.image-crop-range {
    display: grid;
    gap: 8px;
    flex-shrink: 0;
    color: #3b465f;
    font-weight: 900;
}

.image-crop-range input {
    width: 100%;
    accent-color: var(--pink);
}

.image-crop-card footer {
    flex-shrink: 0;
    justify-content: flex-end;
}

.admin-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 800;
}

.admin-alert a {
    text-decoration: underline;
}

.admin-alert.success {
    color: #0b614e;
    background: #e9fff8;
    border: 1px solid #bcefe0;
}

.admin-alert.error {
    color: #8a1f45;
    background: #fff0f5;
    border: 1px solid #ffc8da;
}

.admin-alert.warning {
    color: #704b00;
    background: #fff5d6;
    border: 1px solid #ffe39a;
}

.admin-alert.is-swal-source {
    display: none;
}

.empty-state {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #ced8e4;
    border-radius: var(--radius);
    background: #fbfdff;
}

.message-list {
    display: grid;
    gap: 14px;
}

.message-list.compact {
    gap: 10px;
}

.message-item,
.message-head,
.message-meta {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
}

.message-item strong,
.message-item small {
    display: block;
}

.message-item p {
    margin: 4px 0;
    color: var(--muted);
}

.message-card {
    padding: 18px;
}

.message-head {
    align-items: center;
}

.message-head h3 {
    margin: 0;
}

.message-head small {
    color: var(--muted);
}

.message-head .pill {
    margin-left: auto;
}

.status-dot {
    width: 12px;
    height: 12px;
    margin-top: 9px;
    border-radius: 50%;
    background: var(--muted);
}

.status-dot.new {
    background: var(--pink);
    box-shadow: 0 0 0 5px rgba(255, 111, 159, 0.14);
}

.status-dot.read {
    background: var(--mint);
}

.message-meta {
    flex-wrap: wrap;
    margin: 14px 0;
}

.message-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
}

.message-meta svg {
    width: 16px;
    height: 16px;
    color: var(--sky);
}

.message-card p {
    margin: 0 0 16px;
    color: #374159;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 244, 248, 0.88), rgba(241, 248, 255, 0.92)),
        url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1800&q=85") center / cover;
}

.login-wrap {
    width: min(100%, 980px);
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 18px;
    align-items: stretch;
}

.login-hero,
.login-card {
    padding: 34px;
    backdrop-filter: blur(14px);
}

.login-hero {
    display: grid;
    align-content: end;
    min-height: 520px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(38, 48, 68, 0.14), rgba(38, 48, 68, 0.72)),
        rgba(38, 48, 68, 0.22);
    border-color: rgba(255, 255, 255, 0.24);
    overflow: hidden;
}

.login-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--pink), var(--sky));
    font-size: 1.7rem;
    font-weight: 800;
}

.login-hero h1 {
    font-size: 2.35rem;
}

.login-hero p {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.84);
}

.login-card {
    display: grid;
    align-content: center;
    gap: 16px;
}

.login-card label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.login-card input {
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid #dce5ef;
    border-radius: var(--radius);
    outline: none;
}

.login-card input:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 4px rgba(85, 167, 247, 0.14);
}

.login-home-button {
    width: 100%;
    margin-top: -4px;
    text-decoration: none;
}

.login-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        height: auto;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .admin-nav {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .content-layout,
    .dashboard-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

    .editor-panel {
        position: static;
    }

    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .admin-shell {
        display: block;
        min-height: 100vh;
        padding-top: 78px;
    }

    .admin-mobile-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 130;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 72px;
        padding: 10px 14px;
        border-bottom: 1px solid #ffd8e8;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 24px rgba(54, 72, 110, 0.1);
        backdrop-filter: blur(14px);
    }

    .admin-mobile-brand {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        min-width: 0;
        color: var(--ink);
        font-weight: 900;
    }

    .admin-mobile-brand span {
        display: grid;
        place-items: center;
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        color: #fff;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--pink), var(--lemon) 52%, var(--sky));
        font-size: 1.35rem;
        font-weight: 900;
        box-shadow: 0 10px 22px rgba(255, 111, 159, 0.18);
    }

    .admin-mobile-brand strong {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1.06rem;
        line-height: 1.05;
    }

    .admin-mobile-brand small {
        grid-column: 2;
        display: block;
        margin-top: -7px;
        color: #d94878;
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0;
    }

    .admin-menu-toggle {
        position: relative;
        display: grid;
        place-items: center;
        gap: 4px;
        flex: 0 0 50px;
        width: 50px;
        height: 50px;
        color: #24304a;
        border: 1px solid #ffd8e8;
        border-radius: 16px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 251, 0.96)),
            #fff;
        box-shadow: 0 12px 24px rgba(255, 111, 159, 0.12);
        cursor: pointer;
    }

    .admin-menu-toggle span {
        position: absolute;
        left: 50%;
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transform: translateX(-50%);
        transition: top 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
    }

    .admin-menu-toggle span:nth-child(1) {
        top: 17px;
    }

    .admin-menu-toggle span:nth-child(2) {
        top: 24px;
    }

    .admin-menu-toggle span:nth-child(3) {
        top: 31px;
    }

    .admin-menu-toggle b {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .admin-menu-open .admin-menu-toggle span:nth-child(1) {
        top: 24px;
        transform: translateX(-50%) rotate(45deg);
    }

    .admin-menu-open .admin-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .admin-menu-open .admin-menu-toggle span:nth-child(3) {
        top: 24px;
        transform: translateX(-50%) rotate(-45deg);
    }

    .admin-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 118;
        display: block;
        border: 0;
        background: rgba(36, 48, 74, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .admin-menu-open .admin-menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-sidebar {
        position: fixed;
        top: 84px;
        bottom: 12px;
        left: 12px;
        z-index: 125;
        width: min(86vw, 340px);
        height: auto;
        max-height: calc(100svh - 96px);
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: 0 22px 54px rgba(54, 72, 110, 0.22);
        overflow-y: auto;
        transform: translateX(calc(-100% - 28px));
        transition: transform 0.22s ease;
    }

    .admin-menu-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-brand {
        display: none;
    }

    .admin-user {
        margin-bottom: 8px;
    }

    .admin-main {
        padding: 16px 14px 24px;
    }

    .admin-topbar {
        position: relative;
        display: grid;
        gap: 16px;
        align-items: start;
        margin: 2px 0 18px;
        padding: 18px;
        overflow: hidden;
        border: 1px solid rgba(255, 216, 232, 0.9);
        border-radius: 22px;
        background:
            linear-gradient(135deg, rgba(255, 247, 251, 0.98), rgba(240, 251, 255, 0.96) 58%, rgba(255, 253, 242, 0.98)),
            #fff;
        box-shadow: 0 16px 36px rgba(54, 72, 110, 0.1);
    }

    .admin-topbar::after {
        content: "";
        position: absolute;
        right: 18px;
        top: 16px;
        width: 72px;
        height: 6px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--pink), var(--lemon), var(--sky));
        opacity: 0.7;
    }

    .admin-topbar > div:first-child {
        min-width: 0;
        padding-right: 82px;
    }

    .admin-topbar span {
        display: inline-flex;
        width: fit-content;
        min-height: 28px;
        align-items: center;
        padding: 0 10px;
        color: #d94878;
        border: 1px solid #ffd1df;
        border-radius: 999px;
        background: #fff;
        font-size: 0.78rem;
        box-shadow: 0 8px 18px rgba(255, 111, 159, 0.1);
    }

    .admin-topbar h1 {
        margin-top: 8px;
        font-size: clamp(1.46rem, 8vw, 2.08rem);
        line-height: 1.08;
        text-wrap: balance;
    }

    .panel-heading {
        display: grid;
    }

    .topbar-actions,
    .metric-actions {
        width: 100%;
    }

    .metric-actions > *,
    .admin-button.primary,
    .admin-button.soft {
        width: 100%;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .topbar-actions > * {
        width: 100%;
        min-height: 42px;
        padding: 0 10px;
        border-radius: 14px;
        font-size: 0.9rem;
    }

    .topbar-actions .ghost-button {
        color: #24304a;
        border-color: #dbeafe;
        background: #fff;
        box-shadow: 0 10px 22px rgba(54, 72, 110, 0.08);
    }

    .topbar-actions .ghost-button.danger {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #e95586, #ff835f);
        box-shadow: 0 12px 24px rgba(233, 85, 134, 0.18);
    }

    .admin-nav,
    .module-grid,
    .admin-form-grid,
    .form-two-columns,
    .login-wrap {
        grid-template-columns: 1fr;
    }

    .admin-modal {
        padding: 10px;
    }

    .admin-modal.is-open {
        place-items: stretch;
    }

    .admin-modal-backdrop {
        background:
            linear-gradient(180deg, rgba(36, 48, 74, 0.4), rgba(36, 48, 74, 0.58)),
            rgba(36, 48, 74, 0.42);
        backdrop-filter: blur(12px);
    }

    .admin-modal-card {
        width: 100%;
        max-height: none;
        height: calc(100svh - 20px);
        align-self: stretch;
        grid-template-rows: auto minmax(0, 1fr);
        border-radius: 24px;
        border-color: rgba(231, 237, 247, 0.98);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 253, 255, 0.98)),
            #fff;
        box-shadow: 0 28px 70px rgba(36, 48, 74, 0.32);
    }

    .admin-modal-head {
        position: sticky;
        top: 0;
        z-index: 4;
        align-items: center;
        min-height: 88px;
        padding: 16px 16px 14px;
        border-bottom-color: #e6edf5;
        border-radius: 24px 24px 0 0;
        background:
            linear-gradient(135deg, rgba(255, 247, 251, 0.99), rgba(239, 253, 255, 0.99) 58%, rgba(255, 253, 242, 0.98)),
            #fff;
        box-shadow: 0 10px 24px rgba(54, 72, 110, 0.08);
    }

    .admin-modal-head .panel-kicker {
        display: inline-flex;
        width: fit-content;
        min-height: 26px;
        align-items: center;
        padding: 0 10px;
        color: #d94878;
        border: 1px solid #ffd1df;
        border-radius: 999px;
        background: #fff;
        font-size: 0.74rem;
        box-shadow: 0 8px 18px rgba(255, 111, 159, 0.08);
    }

    .admin-modal-head h2 {
        max-width: calc(100vw - 104px);
        margin-top: 7px;
        font-size: clamp(1.34rem, 7vw, 1.86rem);
        line-height: 1.12;
    }

    .admin-modal-head .icon-button {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        color: #24304a;
        border-color: #dbe7f5;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 10px 22px rgba(54, 72, 110, 0.08);
    }

    .admin-modal-head .icon-button svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.6;
    }

    .admin-modal-form {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 18px;
        padding-bottom: 0;
    }

    .admin-modal-actions {
        position: sticky;
        bottom: 0;
        z-index: 3;
        display: grid;
        grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
        gap: 10px;
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(231, 237, 247, 0.98);
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 251, 0.98)),
            #fff;
        box-shadow: 0 -14px 30px rgba(54, 72, 110, 0.08);
        backdrop-filter: blur(14px);
    }

    .admin-modal-actions .ghost-button,
    .admin-modal-actions .admin-button {
        width: 100%;
        min-height: 48px;
        border-radius: 16px;
        font-size: 1rem;
    }

    .admin-modal-actions .ghost-button {
        color: #43506a;
        border-color: #dbe7f5;
        background: #fff;
        box-shadow: 0 8px 18px rgba(54, 72, 110, 0.07);
    }

    .admin-modal-actions .admin-button.primary {
        background: linear-gradient(135deg, #e95586, #ff835f);
        box-shadow: 0 14px 28px rgba(233, 85, 134, 0.2);
    }

    .link-picker-row {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: 320px;
    }

    .login-card,
    .login-hero {
        padding: 24px;
    }
}

@media (max-width: 430px) {
    .admin-modal-actions {
        grid-template-columns: 1fr;
    }

    .admin-modal-actions .admin-button.primary {
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Cheerful CMS refresh */
:root {
    --ink: #24304a;
    --muted: #64748b;
    --paper: #ffffff;
    --line: #e7edf7;
    --bg: #f7fbff;
    --pink: #ff6f9f;
    --coral: #ff8a65;
    --mint: #48c9b0;
    --sky: #43a7ff;
    --violet: #7c83fd;
    --lemon: #ffd166;
    --danger: #e5486d;
}

body {
    background:
        linear-gradient(180deg, #fff7fb 0%, #f0fbff 42%, #fffdf2 74%, #f6fff8 100%),
        var(--bg);
}

.admin-sidebar {
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 242, 248, 0.98), rgba(239, 253, 255, 0.98) 52%, rgba(255, 253, 242, 0.98)),
        #fff;
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 28px rgba(54, 72, 110, 0.08);
}

.admin-brand {
    border-bottom-color: var(--line);
}

.admin-brand span,
.login-mark {
    background: linear-gradient(135deg, var(--pink), var(--lemon) 52%, var(--sky));
}

.admin-brand small,
.admin-user small {
    color: var(--muted);
}

.admin-user {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 22px rgba(54, 72, 110, 0.07);
}

.admin-user svg {
    color: var(--pink);
}

.admin-nav a {
    color: #43506a;
    background: rgba(255, 255, 255, 0.42);
}

.admin-nav a:hover,
.admin-nav a.is-active {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 10px 20px rgba(54, 72, 110, 0.08);
}

.admin-nav a.is-active svg {
    color: var(--pink);
}

.admin-topbar span,
.panel-kicker {
    color: #d94878;
}

.metric-card,
.admin-panel,
.module-card,
.message-card,
.admin-tip,
.login-card,
.login-hero {
    border-color: rgba(231, 237, 247, 0.95);
    background: rgba(255, 255, 255, 0.94);
}

.hero-metric {
    background:
        linear-gradient(135deg, rgba(255, 242, 248, 0.98), rgba(238, 253, 255, 0.98)),
        #fff;
}

.admin-button.primary {
    background: linear-gradient(135deg, var(--pink), var(--coral));
}

.admin-button.soft,
.ghost-button,
.icon-button {
    background: #fff;
}

.module-card svg {
    background: linear-gradient(135deg, var(--mint), var(--sky));
}

.admin-tip {
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(245, 255, 248, 0.98)),
        #fff;
}

.admin-tip p {
    color: var(--muted);
}

.admin-tip svg {
    color: var(--coral);
}

.login-page {
    background:
        linear-gradient(135deg, rgba(255, 242, 248, 0.82), rgba(238, 253, 255, 0.86)),
        url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=1800&q=85") center / cover;
}

.login-hero {
    color: #fff;
    background:
        linear-gradient(180deg, rgba(36, 48, 74, 0.1), rgba(36, 48, 74, 0.72)),
        rgba(36, 48, 74, 0.18);
}

@media (max-width: 1180px) {
    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 10px 28px rgba(54, 72, 110, 0.08);
    }
}

/* Structured admin redesign */
.admin-nav {
    gap: 10px;
}

.admin-nav-group {
    overflow: hidden;
    border: 1px solid rgba(220, 229, 239, 0.92);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 22px rgba(54, 72, 110, 0.05);
}

.admin-nav-group.is-current {
    border-color: rgba(255, 111, 159, 0.34);
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(240, 251, 255, 0.92)),
        #fff;
}

.admin-nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 60px;
    padding: 11px 12px;
    cursor: pointer;
    list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group-title {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.nav-group-title > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), var(--sky));
    box-shadow: 0 10px 18px rgba(67, 167, 255, 0.13);
}

.nav-group-title strong,
.nav-group-title small {
    display: block;
}

.nav-group-title strong {
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.2;
}

.nav-group-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.28;
}

.nav-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8b9ab0;
    font-size: 0.82rem;
    font-weight: 900;
}

.nav-group-meta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.18s ease;
}

.admin-nav-group[open] .nav-group-meta svg {
    transform: rotate(180deg);
}

.admin-nav-links {
    display: grid;
    gap: 6px;
    padding: 0 10px 10px;
}

.admin-nav .admin-nav-links a {
    min-height: 38px;
    padding: 0 10px;
    color: #43506a;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    font-size: 0.91rem;
}

.admin-nav .admin-nav-links a:hover,
.admin-nav .admin-nav-links a.is-active {
    color: var(--ink);
    border-color: rgba(255, 209, 223, 0.9);
    background: #fff;
    box-shadow: 0 10px 20px rgba(54, 72, 110, 0.07);
}

.admin-nav .admin-nav-links a.is-active {
    font-weight: 900;
}

.admin-nav .admin-nav-links a svg {
    color: var(--sky);
}

.admin-nav .admin-nav-links a.is-active svg {
    color: var(--pink);
}

.module-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.module-section-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.95), rgba(240, 251, 255, 0.92)),
        #fff;
    box-shadow: 0 14px 30px rgba(54, 72, 110, 0.06);
}

.module-section-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.module-section-head > svg {
    width: 46px;
    height: 46px;
    padding: 11px;
    color: #fff;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--mint), var(--sky));
}

.module-section-head strong,
.module-section-head span {
    display: block;
}

.module-section-head strong {
    font-size: 1.1rem;
    line-height: 1.24;
}

.module-section-head span {
    color: var(--muted);
    font-size: 0.9rem;
}

.module-card-list {
    display: grid;
    gap: 9px;
}

.module-card.module-card-compact {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 76px;
    padding: 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: none;
}

.module-card.module-card-compact > svg:first-child {
    width: 38px;
    height: 38px;
    padding: 9px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--pink), var(--coral));
}

.module-card.module-card-compact strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.module-card.module-card-compact span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.35;
}

.module-card.module-card-compact b {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    color: #d94878;
    border-radius: 999px;
    background: #fff1f7;
    font-size: 0.96rem;
}

.module-card.module-card-compact > svg:last-child {
    width: 18px;
    height: 18px;
    padding: 0;
    color: var(--muted);
    background: transparent;
}

.builder-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 20%, rgba(72, 201, 176, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(255, 244, 248, 0.98), rgba(240, 251, 255, 0.96)),
        #fff;
}

.builder-hero h2 {
    max-width: 860px;
    margin: 6px 0 8px;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
}

.builder-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.builder-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.builder-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.builder-status-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 98px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow);
}

.builder-status-card > svg {
    width: 48px;
    height: 48px;
    padding: 12px;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pink), var(--sky));
}

.builder-status-card span,
.builder-status-card strong {
    display: block;
}

.builder-status-card span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.builder-status-card strong {
    font-size: 1.2rem;
    line-height: 1.2;
}

.builder-section {
    border-radius: 22px;
}

.builder-column-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.builder-column-card {
    display: grid;
    gap: 14px;
    align-content: start;
    min-width: 0;
    padding: 18px;
    border: 1px solid color-mix(in srgb, var(--builder-accent, var(--pink)) 28%, #e7edf7);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 251, 0.76)),
        #fff;
    box-shadow: 0 16px 34px rgba(38, 48, 68, 0.07);
}

.builder-column-card header {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.builder-column-card header > svg {
    width: 48px;
    height: 48px;
    padding: 12px;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--builder-accent, var(--pink)), var(--sky));
}

.builder-column-card header span,
.builder-column-card header strong {
    display: block;
}

.builder-column-card header span {
    color: color-mix(in srgb, var(--builder-accent, var(--pink)) 72%, var(--ink));
    font-size: 0.86rem;
    font-weight: 900;
}

.builder-column-card header strong {
    font-size: 1.18rem;
    line-height: 1.2;
}

.builder-column-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.builder-mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.builder-mini-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    color: #8a3b5b;
    font-size: 0.84rem;
    font-weight: 900;
    border-radius: 999px;
    background: #fff0f7;
}

.builder-linked-list,
.builder-library-card > div {
    display: grid;
    gap: 8px;
}

.builder-linked-list a,
.builder-library-card a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    color: #43506a;
    font-weight: 900;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
}

.builder-linked-list a svg,
.builder-library-card a svg {
    width: 16px;
    height: 16px;
    color: var(--sky);
}

.builder-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.builder-tool-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-content: start;
    min-height: 230px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid rgba(231, 237, 247, 0.95);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(38, 48, 68, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.builder-tool-card:hover {
    transform: translateY(-3px);
    border-color: #ffd0e2;
    box-shadow: var(--shadow);
}

.builder-tool-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #fff;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--pink), var(--coral));
}

.builder-tool-icon svg {
    width: 25px;
    height: 25px;
}

.builder-tool-card strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.2;
}

.builder-tool-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
}

.builder-tool-card b {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    color: #8a3b5b;
    border-radius: 999px;
    background: #ffe9f3;
}

.builder-tool-card em {
    grid-column: 1 / -1;
    align-self: end;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
    border: 1px solid #ffc9df;
    border-radius: 13px;
    background: #fff8fb;
}

.builder-library-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.builder-library-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.builder-library-card header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.builder-library-card header > svg {
    width: 44px;
    height: 44px;
    padding: 11px;
    color: #fff;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--mint), var(--sky));
}

.builder-library-card strong,
.builder-library-card span {
    display: block;
}

.builder-library-card strong {
    font-size: 1.04rem;
    line-height: 1.2;
}

.builder-library-card span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.builder-library-card a {
    justify-content: space-between;
}

.builder-command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.07);
}

.builder-command-bar h2 {
    margin: 2px 0 4px;
    font-size: clamp(1.6rem, 2.4vw, 2.2rem);
    line-height: 1.1;
}

.builder-command-bar p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.builder-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 18px;
}

.builder-stat-grid article {
    min-height: 86px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.builder-stat-grid span,
.builder-stat-grid strong {
    display: block;
}

.builder-stat-grid span {
    color: var(--muted);
    font-weight: 800;
    font-size: 0.9rem;
}

.builder-stat-grid strong {
    margin-top: 4px;
    color: var(--ink);
    font-size: 1.34rem;
    line-height: 1.15;
}

.builder-workbench {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.6fr);
    gap: 18px;
    align-items: start;
}

.builder-map-panel,
.builder-editor-panel {
    border-radius: 16px;
    background: #fff;
}

.builder-panel-title,
.builder-editor-head,
.builder-block-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.builder-panel-title h2,
.builder-editor-head h2 {
    margin: 4px 0 4px;
    font-size: 1.46rem;
    line-height: 1.2;
}

.builder-panel-title p,
.builder-editor-head p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.builder-add-page-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.builder-add-page-form label,
.builder-page-settings label,
.builder-add-block-panel label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 900;
}

.builder-add-page-form input,
.builder-page-settings input,
.builder-add-block-panel select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 800;
}

.builder-page-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.builder-page-card {
    display: grid;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.builder-page-card.is-selected {
    border-color: #2f56d8;
    background: #edf3ff;
    box-shadow: inset 4px 0 0 #2f56d8;
}

.builder-page-card > a,
.builder-page-card > span {
    display: grid;
    gap: 2px;
    min-width: 0;
    color: var(--ink);
}

.builder-page-card strong {
    font-size: 1.03rem;
    line-height: 1.2;
}

.builder-page-card small {
    color: var(--muted);
    font-weight: 800;
    word-break: break-word;
}

.builder-page-card > b {
    justify-self: start;
    padding: 5px 10px;
    color: #26395f;
    border-radius: 9px;
    background: #edf3ff;
    font-size: 0.82rem;
}

.builder-page-card > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.builder-page-card button,
.builder-page-card > div a,
.builder-block-actions button,
.builder-block-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    color: #33415f;
    border: 1px solid #dce5f2;
    border-radius: 9px;
    background: #f8fbff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
}

.builder-page-card .danger-text,
.builder-block-actions .danger-text {
    color: #c63d69;
    background: #fff5f8;
}

.builder-editor-panel {
    min-width: 0;
}

.builder-page-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdff;
}

.builder-page-settings.is-readonly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-page-settings input[readonly] {
    color: #6b7589;
    background: #f1f5fa;
}

.builder-add-block-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fbff;
}

.builder-add-block-panel form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(160px, auto);
    gap: 12px;
    align-items: end;
}

.builder-add-block-panel form.is-single-select {
    grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
}

.builder-block-summary {
    align-items: center;
    margin-top: 24px;
    padding-bottom: 10px;
}

.builder-block-summary h3 {
    margin: 0;
    font-size: 1.22rem;
}

.builder-block-summary span {
    color: var(--muted);
    font-weight: 900;
}

.builder-block-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.builder-block-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(16, 24, 40, 0.04);
}

.builder-block-card.is-disabled {
    opacity: 0.64;
    background: #fafbfe;
}

.builder-block-main {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: var(--ink);
}

.builder-block-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, #d45b87, #4aa8ff);
}

.builder-block-icon svg {
    width: 22px;
    height: 22px;
}

.builder-block-main strong,
.builder-block-main small {
    display: block;
}

.builder-block-main strong {
    font-size: 1.07rem;
}

.builder-block-main small {
    color: var(--muted);
    font-weight: 800;
    word-break: break-word;
}

.builder-block-main b {
    color: var(--muted);
    font-size: 0.9rem;
}

.builder-block-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-left: 56px;
}

.builder-empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 34px 18px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #d9e3f0;
    border-radius: 16px;
    background: #fbfdff;
}

.builder-empty-state svg {
    width: 36px;
    height: 36px;
    color: var(--sky);
}

.builder-empty-state strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.builder-empty-state p {
    margin: 0;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .builder-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .builder-workbench {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .builder-command-bar,
    .builder-panel-title,
    .builder-editor-head,
    .builder-block-summary {
        display: grid;
    }

    .builder-stat-grid,
    .builder-page-settings,
    .builder-page-settings.is-readonly,
    .builder-add-block-panel form {
        grid-template-columns: 1fr;
    }

    .builder-block-main {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .builder-block-main b {
        grid-column: 2;
        justify-self: start;
    }

    .builder-block-actions {
        padding-left: 0;
    }
}

.content-manager-heading {
    align-items: stretch;
}

.content-heading-copy {
    min-width: 0;
}

.content-heading-copy h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-heading-copy h2 svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pink), var(--sky));
    flex: 0 0 34px;
}

.content-heading-note {
    display: grid;
    align-content: center;
    min-width: min(300px, 100%);
    max-width: 360px;
    padding: 14px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: 16px;
    background: #fbfdff;
}

.content-heading-note strong,
.content-heading-note span {
    display: block;
}

.content-heading-note strong {
    color: var(--ink);
    font-size: 0.98rem;
}

.content-heading-note span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

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

.admin-form-section {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(220, 229, 239, 0.95);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.7), rgba(248, 253, 255, 0.82)),
        #fff;
}

.admin-form-section-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.admin-form-section-head > svg {
    width: 40px;
    height: 40px;
    padding: 10px;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--violet), var(--sky));
}

.admin-form-section-head strong,
.admin-form-section-head small {
    display: block;
}

.admin-form-section-head strong {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.2;
}

.admin-form-section-head small {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-form-section .admin-field,
.settings-sections label {
    padding: 12px;
    border: 1px solid rgba(220, 229, 239, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-form-section .checkbox-field {
    align-content: center;
}

.admin-form-section .checkbox-field .checkbox-label {
    min-height: 48px;
}

.admin-form-section .link-picker,
.admin-form-section .icon-picker {
    background: #fff;
}

.settings-form > .admin-button.primary {
    justify-self: end;
    min-width: 210px;
}

@media (max-width: 1180px) {
    .admin-nav {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .admin-nav-group {
        border-radius: 18px;
    }

    .admin-nav-group summary {
        min-height: 64px;
    }

    .nav-group-title small {
        font-size: 0.76rem;
    }

    .module-section-grid {
        grid-template-columns: 1fr;
    }

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

    .module-card.module-card-compact {
        min-height: 70px;
    }

    .content-manager-heading {
        grid-template-columns: 1fr;
    }

    .content-heading-note {
        max-width: none;
    }

    .content-heading-copy h2 {
        font-size: clamp(1.36rem, 8vw, 2rem);
    }

    .admin-form-section {
        padding: 12px;
        border-radius: 16px;
    }

    .admin-form-section-head {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .admin-form-section-head > svg {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .admin-form-section .admin-field,
    .settings-sections label {
        padding: 10px;
    }

    .settings-form > .admin-button.primary {
        width: 100%;
    }
}

/* Cleaner content work area */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.content-list-panel {
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.content-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.72), rgba(248, 253, 255, 0.9)),
        #fff;
}

.content-toolbar-copy {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.content-toolbar-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--violet), var(--sky));
    box-shadow: 0 12px 22px rgba(67, 167, 255, 0.14);
}

.content-toolbar-icon svg {
    width: 21px;
    height: 21px;
}

.content-toolbar-copy p {
    max-width: 880px;
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Professional CMS workbench refresh */
:root {
    --admin-bg: #f4f7fb;
    --admin-surface: #ffffff;
    --admin-sidebar: #0f172a;
    --admin-sidebar-2: #172033;
    --admin-ink: #182235;
    --admin-muted: #64748b;
    --admin-line: #dce5f1;
    --admin-soft: #f8fafc;
    --admin-blue: #2563eb;
    --admin-blue-soft: #eff6ff;
    --admin-pink: #d94f7e;
    --admin-danger: #dc3f63;
    --admin-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body.admin-shell {
    grid-template-columns: 316px minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.07), transparent 28rem),
        linear-gradient(180deg, #f8fbff 0%, var(--admin-bg) 100%);
    color: var(--admin-ink);
}

.admin-main {
    min-width: 0;
    padding: 28px clamp(22px, 3vw, 44px) 44px;
}

.admin-main > :not(.admin-modal):not(.image-crop-modal):not(.admin-menu-backdrop) {
    max-width: 1580px;
    margin-left: auto;
    margin-right: auto;
}

.admin-sidebar {
    color: #e5eaf3;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(23, 32, 51, 0.98)),
        var(--admin-sidebar);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 14px 0 36px rgba(15, 23, 42, 0.16);
}

.admin-brand {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.14);
}

.admin-brand span {
    width: 46px;
    height: 46px;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.admin-brand strong {
    color: #fff;
    font-size: 1.08rem;
    line-height: 1.15;
}

.admin-brand small,
.admin-user small {
    color: #94a3b8;
}

.admin-user {
    min-height: 70px;
    padding: 12px 14px;
    color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: none;
}

.admin-user svg {
    color: #93c5fd;
}

.admin-nav {
    display: grid;
    gap: 12px;
}

.admin-nav-group {
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none;
}

.admin-nav-group.is-current {
    border-color: rgba(147, 197, 253, 0.5);
    background: rgba(37, 99, 235, 0.12);
}

.admin-nav-group summary {
    min-height: 58px;
    padding: 10px 12px;
}

.nav-group-title {
    grid-template-columns: 34px minmax(0, 1fr);
}

.nav-group-title > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.18);
    box-shadow: none;
}

.nav-group-title strong {
    color: #f8fafc;
    font-size: 0.92rem;
}

.nav-group-title small {
    max-width: 190px;
    color: #94a3b8;
    font-size: 0.72rem;
    line-height: 1.25;
}

.nav-group-meta {
    color: #94a3b8;
}

.admin-nav .admin-nav-links {
    gap: 3px;
    padding: 0 8px 10px;
}

.admin-nav .admin-nav-links a {
    min-height: 36px;
    padding: 0 10px;
    color: #cbd5e1;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    font-size: 0.88rem;
}

.admin-nav .admin-nav-links a svg {
    width: 17px;
    height: 17px;
    color: #93c5fd;
}

.admin-nav .admin-nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.admin-nav .admin-nav-links a.is-active {
    color: #fff;
    background: var(--admin-blue);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.admin-nav .admin-nav-links a.is-active svg {
    color: #fff;
}

.admin-topbar,
.builder-command-bar,
.admin-panel,
.metric-card,
.module-section-card,
.content-list-panel {
    border: 1px solid var(--admin-line);
    border-radius: 18px;
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.admin-topbar,
.builder-command-bar {
    padding: 22px 26px;
}

.admin-topbar span,
.panel-kicker {
    color: var(--admin-blue);
    letter-spacing: 0;
}

.admin-topbar h1,
.builder-command-bar h2,
.content-heading-copy h2 {
    color: var(--admin-ink);
    letter-spacing: 0;
}

.admin-topbar h1 {
    font-size: clamp(1.8rem, 2.2vw, 2.55rem);
}

.builder-command-bar h2 {
    font-size: clamp(1.72rem, 2.2vw, 2.25rem);
}

.builder-command-bar .ghost-button,
.builder-editor-head .ghost-button {
    flex: 0 0 auto;
    min-width: 116px;
    white-space: nowrap;
}

.builder-command-bar p,
.admin-topbar p,
.content-toolbar-copy p,
.builder-panel-title p,
.builder-editor-head p {
    color: var(--admin-muted);
}

.admin-button.primary {
    background: var(--admin-blue);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.admin-button.primary:hover {
    background: #1d4ed8;
}

.ghost-button,
.admin-button.soft,
.icon-button {
    color: var(--admin-ink);
    border-color: var(--admin-line);
    background: #fff;
    box-shadow: none;
}

.ghost-button:hover,
.admin-button.soft:hover,
.icon-button:hover {
    border-color: #bfdbfe;
    background: var(--admin-blue-soft);
}

.ghost-button.danger,
.icon-button.danger,
.content-list-panel .table-actions .icon-button.danger {
    color: var(--admin-danger);
    border-color: #fecdd3;
    background: #fff1f2;
}

.admin-table th {
    color: #475569;
    background: #f8fafc;
}

.admin-table td {
    color: var(--admin-ink);
}

.content-toolbar {
    background: #fff;
}

.content-toolbar-icon,
.content-heading-copy h2 svg,
.admin-form-section-head > svg {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    box-shadow: none;
}

.admin-form-section {
    border-radius: 16px;
    background: #fff;
}

.admin-form-section .admin-field,
.settings-sections label {
    border-radius: 12px;
    background: #f8fafc;
}

.builder-flow-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px auto;
}

.builder-flow-strip article {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 74px;
    padding: 14px;
    border: 1px solid var(--admin-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.builder-flow-strip b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    border-radius: 11px;
    background: var(--admin-blue);
    font-size: 0.9rem;
}

.builder-flow-strip span,
.builder-flow-strip small {
    display: block;
}

.builder-flow-strip span {
    color: var(--admin-ink);
    font-weight: 900;
    line-height: 1.15;
}

.builder-flow-strip small {
    grid-column: 2;
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.28;
}

.builder-step-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--admin-blue);
    font-size: 0.86rem;
    font-weight: 900;
}

.builder-step-label b {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #fff;
    border-radius: 8px;
    background: var(--admin-blue);
    font-size: 0.78rem;
}

.builder-stat-grid {
    gap: 12px;
    margin: 16px auto 20px;
}

.builder-stat-grid article {
    min-height: 76px;
    padding: 14px 16px;
    border-color: var(--admin-line);
    box-shadow: none;
}

.builder-stat-grid strong {
    font-size: 1.18rem;
}

.builder-workbench {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 20px;
}

.builder-map-panel,
.builder-editor-panel {
    padding: 22px;
}

.builder-panel-title,
.builder-editor-head,
.builder-block-summary {
    padding-bottom: 14px;
}

.builder-panel-title h2,
.builder-editor-head h2 {
    font-size: 1.32rem;
}

.builder-create-page {
    margin-top: 16px;
    border: 1px solid var(--admin-line);
    border-radius: 14px;
    background: #f8fafc;
}

.builder-create-page summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.builder-create-page summary::-webkit-details-marker {
    display: none;
}

.builder-create-page summary > span {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.builder-create-page summary > span > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: var(--admin-blue);
    border-radius: 11px;
    background: var(--admin-blue-soft);
}

.builder-create-page summary strong,
.builder-create-page summary small {
    display: block;
}

.builder-create-page summary strong {
    color: var(--admin-ink);
    font-size: 0.96rem;
}

.builder-create-page summary small {
    color: var(--admin-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.builder-create-page summary > svg {
    width: 18px;
    height: 18px;
    color: var(--admin-muted);
    transition: transform 0.18s ease;
}

.builder-create-page[open] summary > svg {
    transform: rotate(180deg);
}

.builder-add-page-form {
    margin-top: 0;
    padding: 0 14px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.builder-add-page-form input,
.builder-page-settings input,
.builder-add-block-panel select {
    border-color: var(--admin-line);
    border-radius: 11px;
    background: #fff;
}

.builder-page-list {
    gap: 9px;
    margin-top: 16px;
}

.builder-page-card {
    padding: 12px;
    border-radius: 14px;
    box-shadow: none;
}

.builder-page-card.is-selected {
    border-color: #93c5fd;
    background: var(--admin-blue-soft);
    box-shadow: inset 4px 0 0 var(--admin-blue);
}

.builder-page-card strong {
    font-size: 0.98rem;
}

.builder-page-card small {
    color: var(--admin-muted);
    font-size: 0.78rem;
}

.builder-page-card > div {
    gap: 5px;
}

.builder-page-card button,
.builder-page-card > div a,
.builder-block-actions button,
.builder-block-actions a {
    min-height: 30px;
    padding: 0 9px;
    color: #334155;
    border-color: var(--admin-line);
    border-radius: 9px;
    background: #fff;
    font-size: 0.8rem;
}

.builder-page-card .danger-text,
.builder-block-actions .danger-text {
    color: var(--admin-danger);
    border-color: #fecdd3;
    background: #fff1f2;
}

.builder-page-settings,
.builder-add-block-panel {
    border-color: var(--admin-line);
    border-radius: 16px;
    background: #f8fafc;
}

.builder-add-block-panel {
    display: grid;
    gap: 14px;
}

.builder-add-block-head {
    display: grid;
    gap: 4px;
}

.builder-add-block-head p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.builder-add-block-panel form {
    margin: 0;
}

.builder-block-summary {
    margin-top: 22px;
}

.builder-block-summary h3 {
    margin-top: 6px;
}

.builder-block-card {
    border-radius: 14px;
    box-shadow: none;
}

.builder-block-icon {
    background: linear-gradient(135deg, #2563eb, #7dd3fc);
}

.builder-empty-state {
    background: #f8fafc;
}

@media (max-width: 1180px) {
    body.admin-shell {
        display: block;
    }

    .admin-sidebar {
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.99), rgba(23, 32, 51, 0.99)),
            var(--admin-sidebar);
    }

    .builder-flow-strip,
    .builder-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .builder-workbench {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-main {
        padding: 18px 14px 30px;
    }

    .builder-command-bar,
    .admin-topbar {
        padding: 18px;
    }

    .builder-command-bar h2,
    .admin-topbar h1 {
        font-size: 1.72rem;
    }

    .builder-flow-strip,
    .builder-stat-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .builder-flow-strip article {
        min-height: 64px;
        padding: 12px;
    }

    .builder-map-panel,
    .builder-editor-panel {
        padding: 16px;
    }

    .builder-page-settings,
    .builder-page-settings.is-readonly,
    .builder-add-block-panel form,
    .builder-add-block-panel form.is-single-select {
        grid-template-columns: 1fr;
    }

    .builder-block-summary {
        align-items: stretch;
    }

    .admin-nav-group summary {
        min-height: 56px;
    }

    .nav-group-title small {
        max-width: none;
    }
}

.content-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.content-toolbar-actions .admin-button {
    min-height: 44px;
    border-radius: 14px;
}

.content-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    color: #43506a;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #fff;
    font-weight: 900;
}

.content-count-chip svg {
    width: 17px;
    height: 17px;
    color: var(--sky);
}

.content-list-panel .table-wrap {
    padding: 0 20px 20px;
}

.content-list-panel .admin-table {
    min-width: 860px;
}

.content-list-panel .admin-table th {
    padding: 12px 12px;
    color: #5c6880;
    background: #f8fbff;
    font-size: 0.84rem;
    white-space: nowrap;
}

.content-list-panel .admin-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.content-list-panel .admin-table tbody tr {
    transition: background 0.16s ease;
}

.content-list-panel .admin-table tbody tr:hover td {
    background: rgba(248, 253, 255, 0.82);
}

.content-list-panel .actions-col,
.content-list-panel .table-actions-cell {
    width: 210px;
}

.content-list-panel .table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    flex-wrap: nowrap;
}

.content-list-panel .table-actions .icon-button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #fff;
}

.content-list-panel .table-actions .icon-button:hover {
    box-shadow: 0 10px 18px rgba(54, 72, 110, 0.08);
}

.content-list-panel .table-actions .icon-button.danger {
    color: #d94878;
    border-color: #ffd1df;
    background: #fff7fb;
}

.content-list-panel .table-actions .icon-button.danger:hover {
    color: #fff;
    border-color: transparent;
    background: #d94878;
}

@media (max-width: 980px) {
    .content-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .content-toolbar-actions {
        justify-content: space-between;
    }
}

@media (max-width: 760px) {
    .content-list-panel {
        padding: 0;
        border-radius: 18px;
    }

    .content-toolbar {
        gap: 14px;
        padding: 14px;
    }

    .content-toolbar-copy {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
    }

    .content-toolbar-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .content-toolbar-copy p {
        font-size: 0.9rem;
    }

    .content-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .content-toolbar-actions .admin-button,
    .content-count-chip {
        width: 100%;
        justify-content: center;
    }

    .content-list-panel .table-wrap {
        padding: 14px;
        overflow: visible;
    }

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

    .content-list-panel .admin-table thead {
        display: none;
    }

    .content-list-panel .admin-table tbody {
        display: grid;
        gap: 12px;
        width: 100%;
    }

    .content-list-panel .admin-table tr {
        display: grid;
        gap: 10px;
        padding: 14px;
        border: 1px solid #dce5ef;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 24px rgba(54, 72, 110, 0.06);
    }

    .content-list-panel .admin-table tr.is-child-menu-row td,
    .content-list-panel .admin-table tbody tr:hover td {
        background: transparent;
    }

    .content-list-panel .admin-table tr.is-child-menu-row td:nth-child(2) {
        padding-left: 0;
    }

    .content-list-panel .admin-table td {
        display: grid;
        grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        min-height: 0;
        padding: 0;
        border: 0;
    }

    .content-list-panel .admin-table td::before {
        content: attr(data-label);
        color: #6b7890;
        font-size: 0.82rem;
        font-weight: 900;
    }

    .content-list-panel .admin-table .table-actions-cell {
        width: auto;
        grid-template-columns: 1fr;
        gap: 8px;
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    .content-list-panel .admin-table .table-actions-cell::before {
        display: none;
    }

    .content-list-panel .admin-table td[colspan] {
        display: block;
    }

    .content-list-panel .admin-table td[colspan]::before {
        display: none;
    }

    .content-list-panel .table-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .content-list-panel .table-actions .icon-button {
        width: 40px;
        height: 40px;
    }

    .image-crop-modal {
        padding: 10px;
    }

    .image-crop-card {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 14px;
    }

    .image-crop-card header,
    .image-crop-card footer {
        align-items: stretch;
    }

    .image-crop-card footer {
        flex-direction: column;
    }

    .image-crop-card footer .ghost-button,
    .image-crop-card footer .admin-button {
        width: 100%;
        justify-content: center;
    }
}

/* Admin workbench v2: compact, consistent, and task-first */
:root {
    --cms-bg: #f3f7fb;
    --cms-panel: #ffffff;
    --cms-ink: #17223a;
    --cms-muted: #66758c;
    --cms-line: #dbe5f1;
    --cms-blue: #2563eb;
    --cms-blue-2: #60a5fa;
    --cms-pink: #e05283;
    --cms-danger: #d94362;
    --cms-sidebar: #0d1728;
    --cms-sidebar-soft: #172239;
    --cms-radius: 16px;
    --cms-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

body.admin-shell {
    grid-template-columns: 282px minmax(0, 1fr) !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(96, 165, 250, 0.12), transparent 28rem),
        linear-gradient(180deg, #f8fbff 0%, var(--cms-bg) 100%) !important;
    color: var(--cms-ink);
}

.admin-sidebar {
    width: 282px !important;
    padding: 18px 14px !important;
    background:
        linear-gradient(180deg, rgba(13, 23, 40, 0.98), rgba(17, 28, 49, 0.98)),
        var(--cms-sidebar) !important;
    border-right: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: 12px 0 28px rgba(15, 23, 42, 0.14) !important;
}

.admin-brand {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 0 4px 14px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.12) !important;
}

.admin-brand span {
    width: 42px !important;
    height: 42px !important;
    border-radius: 13px !important;
}

.admin-brand strong {
    font-size: 1rem !important;
    line-height: 1.15 !important;
}

.admin-brand small {
    margin-top: 1px !important;
    font-size: 0.72rem !important;
}

.admin-user {
    min-height: 56px !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 9px !important;
    padding: 10px 11px !important;
    margin-bottom: 10px !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(226, 232, 240, 0.11) !important;
}

.admin-user svg {
    width: 18px !important;
    height: 18px !important;
}

.admin-user strong {
    font-size: 0.86rem !important;
    line-height: 1.15 !important;
}

.admin-user small {
    font-size: 0.74rem !important;
}

.admin-nav-search {
    min-height: 38px !important;
    margin: 0 0 12px !important;
    padding: 0 10px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(226, 232, 240, 0.12) !important;
}

.admin-nav-search svg {
    width: 16px !important;
    height: 16px !important;
}

.admin-nav-search input {
    height: 36px !important;
    font-size: 0.78rem !important;
}

.admin-nav {
    gap: 7px !important;
}

.admin-nav-group {
    border-radius: 13px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.admin-nav-group.is-current,
.admin-nav-group[open] {
    border-color: rgba(147, 197, 253, 0.2) !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

.admin-nav-group summary {
    min-height: 44px !important;
    padding: 7px 8px !important;
    gap: 7px !important;
    border-radius: 12px !important;
}

.admin-nav-group summary:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

.nav-group-title {
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 8px !important;
}

.nav-group-title > svg {
    width: 30px !important;
    height: 30px !important;
    padding: 7px !important;
    border-radius: 10px !important;
    color: #bfdbfe !important;
    background: rgba(59, 130, 246, 0.14) !important;
    border: 1px solid rgba(147, 197, 253, 0.16) !important;
}

.nav-group-title strong {
    font-size: 0.85rem !important;
    line-height: 1.18 !important;
    color: #f8fafc !important;
}

.admin-sidebar .nav-group-title small {
    display: none !important;
}

.nav-group-meta {
    min-width: auto !important;
    gap: 5px !important;
    padding: 0 !important;
    color: #9fb0c8 !important;
    font-size: 0.78rem !important;
}

.nav-group-meta svg {
    width: 15px !important;
    height: 15px !important;
}

.admin-nav .admin-nav-links {
    display: grid !important;
    gap: 2px !important;
    padding: 0 7px 8px 45px !important;
}

.admin-nav .admin-nav-links a {
    min-height: 32px !important;
    padding: 0 8px !important;
    gap: 8px !important;
    color: #cbd5e1 !important;
    border-radius: 9px !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
}

.admin-nav .admin-nav-links a svg {
    width: 15px !important;
    height: 15px !important;
    color: #93c5fd !important;
}

.admin-nav .admin-nav-links a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.admin-nav .admin-nav-links a.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--cms-blue), #4f46e5) !important;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22) !important;
}

.admin-main {
    padding: 22px clamp(18px, 2.6vw, 38px) 38px !important;
}

.admin-main > :not(.admin-modal):not(.image-crop-modal):not(.admin-menu-backdrop) {
    max-width: 1480px !important;
}

.admin-topbar {
    min-height: 96px !important;
    padding: 20px 22px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: var(--cms-shadow) !important;
}

.admin-topbar span,
.panel-kicker {
    color: var(--cms-pink) !important;
    font-size: 0.82rem !important;
    letter-spacing: 0 !important;
}

.admin-topbar h1 {
    margin-top: 2px !important;
    font-size: clamp(1.62rem, 2vw, 2.15rem) !important;
    line-height: 1.08 !important;
}

.topbar-actions {
    gap: 8px !important;
}

.ghost-button,
.admin-button,
.icon-button {
    border-radius: 12px !important;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(170px, 0.5fr)) !important;
    gap: 14px !important;
}

.metric-card {
    min-height: 140px !important;
    padding: 20px 22px !important;
    border-radius: 18px !important;
    box-shadow: var(--cms-shadow) !important;
}

.metric-card.hero-metric h2 {
    font-size: clamp(1.28rem, 1.8vw, 1.75rem) !important;
}

.metric-card.hero-metric p {
    max-width: 720px !important;
    color: var(--cms-muted) !important;
    font-size: 0.9rem !important;
    line-height: 1.58 !important;
}

.metric-card > strong {
    font-size: clamp(1.42rem, 2vw, 2rem) !important;
}

.admin-panel,
.content-list-panel,
.builder-map-panel,
.builder-editor-panel,
.module-section-card {
    border-radius: 18px !important;
    border: 1px solid var(--cms-line) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: var(--cms-shadow) !important;
}

.admin-workspace-map {
    padding: 22px !important;
}

.panel-heading h2 {
    font-size: clamp(1.22rem, 1.7vw, 1.65rem) !important;
}

.panel-heading p {
    max-width: 820px !important;
    color: var(--cms-muted) !important;
    font-size: 0.9rem !important;
}

.module-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.module-section-card {
    padding: 16px !important;
}

.module-section-head {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
    margin-bottom: 10px !important;
    border-bottom: 1px solid var(--cms-line) !important;
}

.module-section-head > svg {
    width: 40px !important;
    height: 40px !important;
    padding: 10px !important;
    border-radius: 13px !important;
}

.module-section-head strong {
    font-size: 1rem !important;
}

.module-section-head span {
    display: block !important;
    color: var(--cms-muted) !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
}

.module-card-list {
    gap: 7px !important;
}

.module-card.module-card-compact {
    min-height: 58px !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 10px !important;
    padding: 10px 11px !important;
    border-radius: 13px !important;
    border: 1px solid var(--cms-line) !important;
    background: #fbfdff !important;
    box-shadow: none !important;
}

.module-card.module-card-compact > svg {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
    border-radius: 11px !important;
}

.module-card.module-card-compact strong {
    font-size: 0.92rem !important;
    line-height: 1.18 !important;
}

.module-card.module-card-compact span {
    display: block !important;
    margin-top: 1px !important;
    color: var(--cms-muted) !important;
    font-size: 0.75rem !important;
    line-height: 1.25 !important;
}

.module-card.module-card-compact b {
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    background: #eef6ff !important;
    color: var(--cms-blue) !important;
    font-size: 0.8rem !important;
}

.content-list-panel {
    overflow: hidden !important;
}

.content-toolbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 14px !important;
    padding: 18px 20px !important;
    border-bottom: 1px solid var(--cms-line) !important;
    background: linear-gradient(180deg, #fff, #f9fbff) !important;
}

.content-toolbar-copy {
    grid-template-columns: 38px minmax(0, 1fr) !important;
}

.content-toolbar-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
}

.content-toolbar-copy h2,
.content-heading-copy h2 {
    font-size: clamp(1.28rem, 1.6vw, 1.75rem) !important;
    line-height: 1.16 !important;
}

.content-toolbar-copy p {
    margin-top: 2px !important;
    color: var(--cms-muted) !important;
    font-size: 0.84rem !important;
    line-height: 1.45 !important;
}

.content-toolbelt {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 14px 20px !important;
    background: #f8fbff !important;
    border-bottom: 1px solid var(--cms-line) !important;
}

.content-search-field,
.content-status-filter {
    min-height: 40px !important;
    border-radius: 12px !important;
    background: #fff !important;
}

.content-search-field input,
.content-status-filter select {
    height: 38px !important;
    font-size: 0.86rem !important;
}

.content-visible-count,
.content-sort-hint {
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.content-sort-hint {
    color: #2563eb !important;
    background: #eff6ff !important;
}

.content-list-panel .table-wrap {
    padding: 0 !important;
    overflow-x: auto !important;
}

.content-list-panel .admin-table {
    min-width: 920px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.content-list-panel .admin-table th {
    padding: 11px 14px !important;
    color: #536176 !important;
    background: #f8fafc !important;
    border-bottom: 1px solid var(--cms-line) !important;
    font-size: 0.78rem !important;
}

.content-list-panel .admin-table td {
    padding: 13px 14px !important;
    border-bottom: 1px solid #edf2f8 !important;
    font-size: 0.88rem !important;
}

.content-list-panel .admin-table tbody tr:hover td {
    background: #fbfdff !important;
}

.drag-col {
    width: 74px !important;
}

.drag-cell {
    color: #94a3b8 !important;
}

.drag-handle {
    width: 28px !important;
    height: 28px !important;
    border-radius: 9px !important;
    background: #f1f5f9 !important;
    border: 1px solid #dbe5f1 !important;
}

.drag-handle:hover {
    color: #fff !important;
    background: var(--cms-blue) !important;
    border-color: var(--cms-blue) !important;
}

.drag-order {
    min-width: 22px !important;
    color: #64748b !important;
    font-size: 0.78rem !important;
}

.table-actions {
    gap: 6px !important;
}

.content-list-panel .table-actions .icon-button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
}

.builder-workbench {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) !important;
    gap: 18px !important;
}

.builder-map-panel,
.builder-editor-panel {
    padding: 18px !important;
}

.builder-page-card,
.builder-block-card {
    border-radius: 14px !important;
    box-shadow: none !important;
}

.builder-page-card {
    grid-template-columns: 30px minmax(0, 1fr) !important;
}

.builder-block-card {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    padding: 13px !important;
}

.builder-drag-handle {
    width: 28px !important;
    height: 28px !important;
}

@media (max-width: 1180px) {
    body.admin-shell {
        display: block !important;
    }

    .admin-sidebar {
        width: min(88vw, 330px) !important;
        padding-top: 76px !important;
    }

    .admin-mobile-header {
        display: flex !important;
        height: 68px !important;
        padding: 10px 14px !important;
        background: rgba(255, 255, 255, 0.96) !important;
        border-bottom: 1px solid #ffd6e6 !important;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    }

    .dashboard-grid,
    .module-section-grid,
    .builder-workbench {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .admin-main {
        padding: 14px 12px 28px !important;
    }

    .admin-topbar {
        min-height: auto !important;
        padding: 16px !important;
        align-items: stretch !important;
    }

    .admin-topbar h1 {
        font-size: 1.58rem !important;
    }

    .topbar-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .content-toolbar,
    .content-toolbelt {
        grid-template-columns: 1fr !important;
        padding: 14px !important;
    }

    .content-toolbar-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .content-toolbar-actions .admin-button,
    .content-count-chip,
    .content-visible-count,
    .content-sort-hint {
        width: 100% !important;
        justify-content: center !important;
    }

    .content-list-panel .table-wrap {
        padding: 12px !important;
        overflow: visible !important;
    }

    .content-list-panel .admin-table {
        min-width: 0 !important;
    }

    .content-list-panel .admin-table tr {
        border-radius: 14px !important;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
    }

    .content-list-panel .admin-table td {
        padding: 0 !important;
        font-size: 0.86rem !important;
    }

    .drag-cell {
        grid-template-columns: minmax(88px, 32%) minmax(0, 1fr) !important;
    }

    .module-section-card,
    .admin-workspace-map,
    .admin-panel {
        padding: 14px !important;
        border-radius: 16px !important;
    }
}

/* Page and block studio */
.cms-studio-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px !important;
}

.cms-studio-hero h2 {
    margin: 2px 0 4px;
    color: var(--cms-ink);
    font-size: clamp(1.75rem, 2.4vw, 2.6rem);
    line-height: 1.05;
}

.cms-studio-hero p {
    max-width: 780px;
    margin: 0;
    color: var(--cms-muted);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.55;
}

.cms-studio-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cms-studio-actions .ghost-button,
.cms-canvas-header .ghost-button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.cms-studio-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cms-studio-metrics article {
    min-height: 104px;
    padding: 16px 18px;
    border: 1px solid var(--cms-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
}

.cms-studio-metrics span,
.cms-studio-metrics small {
    display: block;
    color: var(--cms-muted);
    font-weight: 900;
}

.cms-studio-metrics span {
    font-size: 0.82rem;
}

.cms-studio-metrics strong {
    display: block;
    margin: 4px 0;
    color: var(--cms-ink);
    font-size: clamp(1.35rem, 2vw, 1.95rem);
    line-height: 1.05;
}

.cms-studio-metrics small {
    font-size: 0.76rem;
    line-height: 1.35;
}

.cms-studio-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(280px, 330px);
    gap: 16px;
    align-items: start;
}

.cms-page-library,
.cms-page-canvas,
.cms-inspector {
    min-width: 0;
    padding: 18px !important;
}

.cms-page-library,
.cms-inspector {
    position: sticky;
    top: 18px;
}

.cms-panel-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.cms-panel-head h3,
.cms-canvas-header h3 {
    margin: 0;
    color: var(--cms-ink);
    font-size: 1.34rem;
    line-height: 1.14;
}

.cms-panel-head p,
.cms-canvas-header p {
    margin: 0;
    color: var(--cms-muted);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.45;
}

.cms-builder-search {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 42px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid var(--cms-line);
    border-radius: 12px;
    background: #f8fbff;
}

.cms-builder-search svg {
    width: 17px;
    height: 17px;
    color: #60a5fa;
}

.cms-builder-search input {
    width: 100%;
    min-width: 0;
    height: 40px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cms-ink);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
}

.cms-create-page {
    margin-bottom: 16px;
    border: 1px solid var(--cms-line);
    border-radius: 14px;
    background: #fbfdff;
    overflow: hidden;
}

.cms-create-page summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.cms-create-page summary::-webkit-details-marker {
    display: none;
}

.cms-create-page summary > span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--cms-ink);
    font-weight: 900;
}

.cms-create-page summary svg {
    width: 18px;
    height: 18px;
    color: var(--cms-blue);
}

.cms-create-page form {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.cms-create-page label,
.cms-page-settings label,
.cms-page-add-block label,
.cms-add-block-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 900;
}

.cms-create-page input,
.cms-page-settings input,
.cms-page-add-block select,
.cms-add-block-form select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    color: var(--cms-ink);
    border: 1px solid var(--cms-line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-weight: 800;
}

.cms-page-group {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.cms-page-group h4,
.cms-system-pages h4 {
    margin: 0;
    color: #516079;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: none;
}

.cms-page-list {
    display: grid;
    gap: 8px;
}

.cms-page-card {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 64px;
    padding: 10px;
    color: var(--cms-ink);
    border: 1px solid var(--cms-line);
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    box-shadow: none;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.cms-page-card:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
    transform: translateY(-1px);
}

.cms-page-card.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: inset 4px 0 0 var(--cms-blue);
}

.cms-page-card-home {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

.cms-page-card-system {
    grid-template-columns: 38px minmax(0, 1fr);
}

.cms-page-card-system .cms-page-actions {
    grid-column: 2;
    justify-content: flex-start;
}

.cms-page-card > a,
.cms-page-card > span:not(.drag-handle):not(.cms-page-icon),
.cms-page-card .cms-page-actions {
    min-width: 0;
}

.cms-page-card strong,
.cms-page-card small {
    display: block;
    min-width: 0;
}

.cms-page-card strong {
    color: var(--cms-ink);
    font-size: 0.92rem;
    line-height: 1.22;
}

.cms-page-card small {
    margin-top: 2px;
    color: var(--cms-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-page-card b {
    padding: 5px 8px;
    color: var(--cms-blue);
    border-radius: 999px;
    background: #eff6ff;
    font-size: 0.72rem;
}

.cms-page-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cms-blue), #7dd3fc);
}

.cms-page-icon svg {
    width: 19px;
    height: 19px;
}

.cms-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.cms-page-actions a,
.cms-page-actions button,
.cms-block-actions a,
.cms-block-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 9px;
    color: #334155;
    border: 1px solid var(--cms-line);
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.cms-page-actions .danger-text,
.cms-block-actions .danger-text {
    color: var(--cms-danger);
    border-color: #fecdd3;
    background: #fff1f2;
}

.cms-drag-handle {
    width: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    background: #f1f5f9 !important;
    flex: 0 0 auto;
}

.cms-canvas-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--cms-line);
}

.cms-readonly-page,
.cms-page-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 10px;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--cms-line);
    border-radius: 14px;
    background: #f8fbff;
}

.cms-readonly-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cms-readonly-page span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cms-readonly-page strong {
    color: var(--cms-ink);
    font-size: 0.88rem;
}

.cms-readonly-page small {
    color: var(--cms-muted);
    font-weight: 800;
}

.cms-home-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 12px;
}

.cms-home-column {
    min-width: 0;
    border: 1px solid var(--cms-line);
    border-radius: 16px;
    background: #fbfdff;
    overflow: hidden;
}

.cms-home-column > header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--cms-line);
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.cms-home-column > header span {
    color: var(--cms-pink);
    font-size: 0.82rem;
    font-weight: 900;
}

.cms-home-column > header strong {
    justify-self: end;
    color: var(--cms-ink);
    font-size: 0.82rem;
}

.cms-home-column > header small {
    grid-column: 1 / -1;
    color: var(--cms-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.cms-add-block-form,
.cms-page-add-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--cms-line);
    background: #fff;
}

.cms-add-block-form select,
.cms-page-add-block select {
    min-height: 40px;
    font-size: 0.8rem;
}

.cms-add-block-form .admin-button,
.cms-page-add-block .admin-button {
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
}

.cms-section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 10px;
}

.cms-section-title h4 {
    margin: 0;
    color: var(--cms-ink);
    font-size: 1.2rem;
}

.cms-section-title b {
    color: var(--cms-muted);
    font-size: 0.86rem;
}

.cms-block-list {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.cms-block-list.is-page-blocks {
    padding: 0;
}

.cms-block-card {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--cms-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: none;
}

.cms-block-list.is-page-blocks .cms-block-card {
    grid-template-columns: 30px 34px minmax(0, 1fr) auto auto;
    min-height: 72px;
}

.cms-block-card.is-disabled {
    opacity: 0.68;
    background: #f8fafc;
}

.cms-block-copy {
    min-width: 0;
    color: var(--cms-ink);
    text-decoration: none;
}

.cms-block-copy strong,
.cms-block-copy small {
    display: block;
    min-width: 0;
}

.cms-block-copy strong {
    color: var(--cms-ink);
    font-size: 0.9rem;
    line-height: 1.24;
}

.cms-block-copy small {
    margin-top: 2px;
    color: var(--cms-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cms-block-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--cms-blue);
    border-radius: 11px;
    background: #eff6ff;
    font-weight: 900;
}

.cms-block-status {
    justify-self: end;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
}

.cms-block-status.on {
    color: #047857;
    background: #ecfdf5;
}

.cms-block-status.off {
    color: #9f1239;
    background: #fff1f2;
}

.cms-block-actions {
    grid-column: 2 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
}

.cms-block-list.is-page-blocks .cms-block-actions {
    grid-column: auto;
    justify-content: flex-end;
    padding-top: 0;
}

.cms-inspector-card {
    display: grid;
    gap: 3px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid var(--cms-line);
    border-radius: 14px;
    background: #f8fbff;
}

.cms-inspector-card span,
.cms-inspector-card small {
    color: var(--cms-muted);
    font-size: 0.8rem;
    font-weight: 900;
}

.cms-inspector-card strong {
    color: var(--cms-ink);
    font-size: 1.08rem;
    line-height: 1.2;
}

.cms-system-pages {
    display: grid;
    gap: 9px;
}

.cms-system-page {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--cms-line);
    border-radius: 13px;
    background: #fff;
}

.cms-system-page > svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    color: var(--cms-blue);
    border-radius: 11px;
    background: #eff6ff;
}

.cms-system-page strong,
.cms-system-page small {
    display: block;
    min-width: 0;
}

.cms-system-page strong {
    color: var(--cms-ink);
    font-size: 0.88rem;
    line-height: 1.2;
}

.cms-system-page small {
    margin-top: 2px;
    color: var(--cms-muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.32;
}

.cms-system-page a {
    grid-column: 2;
    width: fit-content;
    margin-top: 4px;
    color: var(--cms-blue);
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
}

.cms-empty-note {
    padding: 14px;
    color: var(--cms-muted);
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 1500px) {
    .cms-studio-layout {
        grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    }

    .cms-inspector {
        position: static;
        grid-column: 1 / -1;
    }

    .cms-system-pages {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .cms-studio-layout,
    .cms-studio-metrics,
    .cms-home-board,
    .cms-system-pages {
        grid-template-columns: 1fr;
    }

    .cms-page-library {
        position: static;
    }
}

@media (max-width: 760px) {
    .cms-studio-hero,
    .cms-canvas-header,
    .cms-section-title {
        display: grid;
    }

    .cms-studio-actions,
    .cms-studio-actions .ghost-button,
    .cms-canvas-header .ghost-button {
        width: 100%;
        justify-content: center;
    }

    .cms-studio-metrics article {
        min-height: auto;
    }

    .cms-readonly-page,
    .cms-page-settings,
    .cms-page-add-block,
    .cms-add-block-form,
    .cms-block-list.is-page-blocks .cms-block-card {
        grid-template-columns: 1fr;
    }

    .cms-page-card {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .cms-page-actions,
    .cms-page-card b {
        grid-column: 2;
        justify-self: start;
    }

    .cms-block-card,
    .cms-block-list.is-page-blocks .cms-block-card {
        grid-template-columns: 30px minmax(0, 1fr) auto;
    }

    .cms-block-number {
        display: none;
    }

    .cms-block-actions,
    .cms-block-list.is-page-blocks .cms-block-actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }
}

/* Final CMS Studio rebuild. Keep this block last so the new admin model wins over legacy rules. */
body.admin-studio-shell {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    background:
        radial-gradient(circle at 8% 0%, rgba(96, 165, 250, 0.16), transparent 30rem),
        radial-gradient(circle at 92% 18%, rgba(244, 114, 182, 0.12), transparent 28rem),
        linear-gradient(180deg, #edf4fb 0%, #f8fafc 46%, #f4f7fb 100%) !important;
}

body.admin-studio-shell .admin-sidebar.admin-command-rail {
    position: sticky !important;
    top: 0 !important;
    z-index: 80 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 18px !important;
    width: 118px !important;
    min-width: 118px !important;
    max-width: 118px !important;
    height: 100vh !important;
    padding: 18px 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: #e5edf7 !important;
    border: 0 !important;
    border-right: 1px solid rgba(148, 163, 184, 0.18) !important;
    background: linear-gradient(180deg, #07111f 0%, #0b1627 52%, #111827 100%) !important;
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.18) !important;
}

body.admin-studio-shell .admin-rail-brand {
    display: grid !important;
    justify-items: center !important;
    gap: 7px !important;
    min-height: auto !important;
    padding: 0 !important;
    color: #f8fafc !important;
    text-decoration: none !important;
}

body.admin-studio-shell .admin-rail-brand span {
    display: grid !important;
    place-items: center !important;
    width: 58px !important;
    height: 58px !important;
    color: #fff !important;
    border-radius: 19px !important;
    background: linear-gradient(135deg, #fb7185 0%, #fde047 50%, #60a5fa 100%) !important;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.2) !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-rail-brand small {
    color: #cbd5e1 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .admin-rail-nav {
    display: grid !important;
    align-content: start !important;
    gap: 9px !important;
    padding: 0 !important;
}

body.admin-studio-shell .admin-rail-nav a {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    min-height: 78px !important;
    padding: 9px 6px !important;
    color: #b7c7dc !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    background: transparent !important;
    text-align: center !important;
    text-decoration: none !important;
    transform: none !important;
}

body.admin-studio-shell .admin-rail-nav a:hover {
    color: #fff !important;
    border-color: rgba(147, 197, 253, 0.28) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body.admin-studio-shell .admin-rail-nav a.is-active {
    color: #fff !important;
    border-color: rgba(191, 219, 254, 0.42) !important;
    background: linear-gradient(180deg, #2563eb 0%, #4f46e5 100%) !important;
    box-shadow: 0 16px 26px rgba(37, 99, 235, 0.3) !important;
}

body.admin-studio-shell .admin-rail-nav a svg {
    width: 23px !important;
    height: 23px !important;
    color: currentColor !important;
}

body.admin-studio-shell .admin-rail-nav a span {
    display: -webkit-box !important;
    max-width: 88px !important;
    min-height: 2.32em !important;
    overflow: hidden !important;
    color: currentColor !important;
    font-size: 0.69rem !important;
    font-weight: 900 !important;
    line-height: 1.16 !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
}

body.admin-studio-shell .admin-rail-nav a b {
    position: absolute !important;
    top: 7px !important;
    right: 7px !important;
    display: grid !important;
    place-items: center !important;
    min-width: 19px !important;
    height: 19px !important;
    padding: 0 6px !important;
    color: #0f172a !important;
    border-radius: 999px !important;
    background: #e0f2fe !important;
    font-size: 0.64rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-rail-user {
    display: grid !important;
    place-items: center !important;
    width: 46px !important;
    height: 46px !important;
    margin: 0 auto !important;
    color: #bfdbfe !important;
    border: 1px solid rgba(147, 197, 253, 0.28) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

body.admin-studio-shell .admin-main {
    min-width: 0 !important;
    width: 100% !important;
    padding: 24px clamp(18px, 2.2vw, 34px) 48px !important;
    overflow-x: hidden !important;
}

body.admin-studio-shell .admin-main > :not(.admin-modal):not(.image-crop-modal):not(.admin-menu-backdrop) {
    width: 100% !important;
    max-width: 1680px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

body.admin-studio-shell .admin-studio-topbar {
    display: grid !important;
    grid-template-columns: minmax(250px, 0.9fr) minmax(320px, 1.2fr) auto !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 18px 20px !important;
    margin-bottom: 14px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08) !important;
}

body.admin-studio-shell .admin-studio-title {
    min-width: 0 !important;
}

body.admin-studio-shell .admin-studio-title span {
    display: block !important;
    color: #db4f7f !important;
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .admin-studio-title h1 {
    margin: 2px 0 !important;
    color: #16233a !important;
    font-size: clamp(1.62rem, 2vw, 2.24rem) !important;
    line-height: 1.08 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .admin-studio-title p {
    margin: 0 !important;
    color: #66758c !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    line-height: 1.38 !important;
}

body.admin-studio-shell .admin-command-search {
    position: relative !important;
    min-width: 0 !important;
}

body.admin-studio-shell .admin-command-search label {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 50px !important;
    padding: 0 14px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .admin-command-search input {
    width: 100% !important;
    min-width: 0 !important;
    height: 48px !important;
    padding: 0 !important;
    color: #16233a !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .admin-command-search svg {
    width: 19px !important;
    height: 19px !important;
    color: #60a5fa !important;
}

body.admin-studio-shell .admin-command-results {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 120 !important;
    display: grid !important;
    gap: 6px !important;
    max-height: min(420px, 70vh) !important;
    padding: 10px !important;
    overflow-y: auto !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16) !important;
}

body.admin-studio-shell .admin-command-results[hidden] {
    display: none !important;
}

body.admin-studio-shell .admin-command-results a {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 54px !important;
    padding: 8px !important;
    color: #16233a !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: transparent !important;
    text-decoration: none !important;
}

body.admin-studio-shell .admin-command-results a:hover {
    background: #eff6ff !important;
}

body.admin-studio-shell .admin-studio-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .admin-studio-actions .ghost-button {
    min-height: 46px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-context-nav {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: center !important;
    padding: 12px 14px !important;
    margin-bottom: 18px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045) !important;
}

body.admin-studio-shell .admin-context-nav > div {
    display: grid !important;
    gap: 2px !important;
    min-width: 146px !important;
}

body.admin-studio-shell .admin-context-nav nav {
    display: flex !important;
    gap: 8px !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
}

body.admin-studio-shell .admin-context-nav a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 0 0 auto !important;
    min-height: 40px !important;
    padding: 0 13px !important;
    color: #475569 !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 999px !important;
    background: #fff !important;
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

body.admin-studio-shell .admin-context-nav a.is-active {
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.18) !important;
}

body.admin-studio-shell .admin-context-nav a svg {
    width: 17px !important;
    height: 17px !important;
}

body.admin-studio-shell .admin-panel,
body.admin-studio-shell .content-list-panel {
    border: 1px solid #dbe5f1 !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.065) !important;
}

body.admin-studio-shell .content-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 16px !important;
    align-items: center !important;
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.admin-studio-shell .content-toolbar-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 15px !important;
}

body.admin-studio-shell .content-toolbar-copy h2 {
    margin: 0 !important;
    color: #17223a !important;
    font-size: clamp(1.2rem, 1.6vw, 1.52rem) !important;
    line-height: 1.16 !important;
}

body.admin-studio-shell .content-toolbar-copy p {
    max-width: 900px !important;
    margin: 4px 0 0 !important;
    color: #66758c !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

body.admin-studio-shell .content-list-panel .table-wrap {
    overflow-x: auto !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-list-panel .admin-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

body.admin-studio-shell .content-list-panel .admin-table th {
    padding: 13px 14px !important;
    color: #64748b !important;
    background: #f8fafc !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .content-list-panel .admin-table td {
    padding: 13px 14px !important;
    color: #243047 !important;
    border-top: 1px solid #e2e8f0 !important;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .content-list-panel .table-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .content-list-panel .table-actions .icon-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .cms-studio-hero {
    display: none !important;
}

body.admin-studio-shell .cms-studio-metrics {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

body.admin-studio-shell .cms-studio-metrics article {
    min-height: 90px !important;
    padding: 15px 16px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05) !important;
}

body.admin-studio-shell .cms-studio-metrics span,
body.admin-studio-shell .cms-studio-metrics small {
    color: #66758c !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .cms-studio-metrics strong {
    color: #16233a !important;
    font-size: clamp(1.28rem, 1.7vw, 1.78rem) !important;
    line-height: 1.08 !important;
}

body.admin-studio-shell .cms-studio-layout {
    display: grid !important;
    grid-template-columns: minmax(310px, 380px) minmax(0, 1fr) !important;
    gap: 18px !important;
    align-items: start !important;
}

body.admin-studio-shell .cms-page-library,
body.admin-studio-shell .cms-page-canvas {
    min-width: 0 !important;
    padding: 18px !important;
}

body.admin-studio-shell .cms-page-library {
    position: sticky !important;
    top: 18px !important;
    max-height: calc(100vh - 42px) !important;
    overflow-y: auto !important;
}

body.admin-studio-shell .cms-inspector {
    display: none !important;
}

body.admin-studio-shell .cms-panel-head,
body.admin-studio-shell .cms-canvas-header {
    gap: 4px !important;
    margin-bottom: 14px !important;
}

body.admin-studio-shell .cms-canvas-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.admin-studio-shell .cms-panel-head h3,
body.admin-studio-shell .cms-canvas-header h3 {
    color: #16233a !important;
    font-size: clamp(1.28rem, 1.6vw, 1.62rem) !important;
    line-height: 1.16 !important;
}

body.admin-studio-shell .cms-panel-head p,
body.admin-studio-shell .cms-canvas-header p {
    color: #66758c !important;
    font-size: 0.84rem !important;
    font-weight: 800 !important;
    line-height: 1.42 !important;
}

body.admin-studio-shell .cms-create-page {
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .cms-page-group {
    margin-top: 16px !important;
}

body.admin-studio-shell .cms-page-group h4,
body.admin-studio-shell .cms-system-pages h4 {
    color: #64748b !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .cms-page-card {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 62px !important;
    padding: 10px !important;
    color: #16233a !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 16px !important;
    background: #fff !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.admin-studio-shell .cms-page-card.is-selected {
    border-color: #60a5fa !important;
    background: #eff6ff !important;
    box-shadow: inset 4px 0 0 #2563eb !important;
}

body.admin-studio-shell .cms-page-card > a {
    min-width: 0 !important;
    color: inherit !important;
    text-decoration: none !important;
}

body.admin-studio-shell .cms-page-card strong,
body.admin-studio-shell .cms-page-card small,
body.admin-studio-shell .cms-block-copy strong,
body.admin-studio-shell .cms-block-copy small {
    display: block !important;
    min-width: 0 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

body.admin-studio-shell .cms-page-card strong,
body.admin-studio-shell .cms-block-copy strong {
    color: #16233a !important;
    font-size: 0.9rem !important;
    line-height: 1.22 !important;
}

body.admin-studio-shell .cms-page-card small,
body.admin-studio-shell .cms-block-copy small {
    margin-top: 2px !important;
    color: #66758c !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .cms-page-actions,
body.admin-studio-shell .cms-block-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .cms-page-actions a,
body.admin-studio-shell .cms-page-actions button,
body.admin-studio-shell .cms-block-actions a,
body.admin-studio-shell .cms-block-actions button {
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 0 9px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #334155 !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .cms-page-actions .danger-text,
body.admin-studio-shell .cms-block-actions .danger-text {
    color: #be123c !important;
    border-color: #fecdd3 !important;
    background: #fff1f2 !important;
}

body.admin-studio-shell .cms-readonly-page,
body.admin-studio-shell .cms-page-settings,
body.admin-studio-shell .cms-page-add-block {
    border: 1px solid #dbe5f1 !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .cms-home-board {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body.admin-studio-shell .cms-home-column {
    min-width: 0 !important;
    overflow: hidden !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 18px !important;
    background: #fff !important;
}

body.admin-studio-shell .cms-home-column > header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 4px 8px !important;
    padding: 12px 14px !important;
    background: linear-gradient(180deg, #fff, #f8fbff) !important;
}

body.admin-studio-shell .cms-add-block-form,
body.admin-studio-shell .cms-page-add-block {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 12px !important;
}

body.admin-studio-shell .cms-block-list {
    display: grid !important;
    gap: 8px !important;
    padding: 12px !important;
}

body.admin-studio-shell .cms-block-list.is-page-blocks {
    padding: 0 !important;
}

body.admin-studio-shell .cms-block-card,
body.admin-studio-shell .cms-block-list.is-page-blocks .cms-block-card {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto auto !important;
    gap: 9px !important;
    align-items: center !important;
    min-width: 0 !important;
    min-height: 68px !important;
    padding: 10px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .cms-block-number {
    display: none !important;
}

body.admin-studio-shell .cms-block-actions,
body.admin-studio-shell .cms-block-list.is-page-blocks .cms-block-actions {
    grid-column: auto !important;
}

body.admin-studio-shell .cms-drag-handle,
body.admin-studio-shell .drag-handle {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
    border-radius: 12px !important;
    background: #eff6ff !important;
    cursor: grab !important;
}

body.admin-studio-shell [data-sortable-row].is-dragging {
    opacity: 0.62 !important;
    transform: scale(0.992) !important;
}

@media (max-width: 1120px) {
    body.admin-studio-shell .admin-studio-topbar {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .admin-studio-actions {
        justify-content: stretch !important;
    }

    body.admin-studio-shell .admin-studio-actions .ghost-button {
        flex: 1 1 0 !important;
        justify-content: center !important;
    }

    body.admin-studio-shell .cms-studio-metrics,
    body.admin-studio-shell .cms-home-board {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.admin-studio-shell .cms-studio-layout {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .cms-page-library {
        position: static !important;
        max-height: none !important;
    }
}

@media (max-width: 1180px) {
    body.admin-studio-shell {
        display: block !important;
        padding-top: 76px !important;
    }

    body.admin-studio-shell .admin-mobile-header {
        display: flex !important;
        height: 76px !important;
        padding: 10px 16px !important;
    }

    body.admin-studio-shell .admin-sidebar.admin-command-rail {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 150 !important;
        width: min(88vw, 360px) !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 100vh !important;
        padding: 86px 18px 22px !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
    }

    body.admin-menu-open.admin-studio-shell .admin-sidebar.admin-command-rail {
        transform: translateX(0) !important;
    }

    body.admin-studio-shell .admin-rail-brand,
    body.admin-studio-shell .admin-rail-user {
        display: none !important;
    }

    body.admin-studio-shell .admin-rail-nav a {
        grid-template-columns: 42px minmax(0, 1fr) auto !important;
        justify-items: start !important;
        min-height: 58px !important;
        padding: 9px 12px !important;
        text-align: left !important;
    }

    body.admin-studio-shell .admin-rail-nav a span {
        max-width: none !important;
        min-height: 0 !important;
        font-size: 0.9rem !important;
        -webkit-line-clamp: 1 !important;
    }

    body.admin-studio-shell .admin-rail-nav a b {
        position: static !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-main {
        padding: 14px 12px 28px !important;
    }

    body.admin-studio-shell .admin-studio-topbar {
        padding: 15px !important;
        border-radius: 20px !important;
    }

    body.admin-studio-shell .admin-studio-title h1 {
        font-size: 1.52rem !important;
    }

    body.admin-studio-shell .admin-studio-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .admin-context-nav {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .admin-context-nav nav {
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow: visible !important;
    }

    body.admin-studio-shell .admin-context-nav a {
        justify-content: center !important;
        width: 100% !important;
    }

    body.admin-studio-shell .cms-studio-metrics,
    body.admin-studio-shell .cms-home-board,
    body.admin-studio-shell .cms-readonly-page,
    body.admin-studio-shell .cms-page-settings,
    body.admin-studio-shell .cms-page-add-block,
    body.admin-studio-shell .cms-add-block-form,
    body.admin-studio-shell .content-toolbar {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .cms-block-card,
    body.admin-studio-shell .cms-block-list.is-page-blocks .cms-block-card,
    body.admin-studio-shell .cms-page-card {
        grid-template-columns: 34px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .cms-page-actions,
    body.admin-studio-shell .cms-block-actions,
    body.admin-studio-shell .cms-block-list.is-page-blocks .cms-block-actions {
        grid-column: 2 !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }

    body.admin-studio-shell .cms-block-status,
    body.admin-studio-shell .cms-page-card b {
        grid-column: 2 !important;
        justify-self: start !important;
    }
}

/* Website Studio */
body.admin-studio-shell .studio-hero-panel,
body.admin-studio-shell .studio-editor-panel,
body.admin-studio-shell .studio-control-panel,
body.admin-studio-shell .studio-area-card,
body.admin-studio-shell .studio-theme-card {
    border: 1px solid #dbe5f1;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 50px rgba(37, 48, 77, 0.08);
}

body.admin-studio-shell .admin-context-nav nav {
    flex-wrap: wrap;
    overflow: visible;
}

body.admin-studio-shell .admin-context-nav a {
    flex: 0 1 auto;
}

body.admin-studio-shell .studio-hero-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 24px 28px;
    border-radius: 26px;
}

body.admin-studio-shell .studio-hero-panel span,
body.admin-studio-shell .studio-panel-head span,
body.admin-studio-shell .studio-area-card span:first-child {
    color: #cf4774;
    font-weight: 800;
}

body.admin-studio-shell .studio-hero-panel h2,
body.admin-studio-shell .studio-panel-head h3,
body.admin-studio-shell .studio-control-panel h3 {
    margin: 4px 0 0;
    color: #24304a;
    font-size: clamp(1.45rem, 2vw, 2.25rem);
    line-height: 1.15;
}

body.admin-studio-shell .studio-hero-panel p,
body.admin-studio-shell .studio-control-panel p,
body.admin-studio-shell .studio-area-card span,
body.admin-studio-shell .studio-block-title small {
    margin: 6px 0 0;
    color: #69768d;
    font-weight: 700;
}

body.admin-studio-shell .studio-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.admin-studio-shell .studio-area-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px 14px;
    min-height: 150px;
    padding: 18px;
    border-radius: 24px;
    color: #24304a;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.admin-studio-shell .studio-area-card:hover {
    transform: translateY(-3px);
    border-color: #ffb6d0;
    box-shadow: 0 24px 54px rgba(207, 71, 116, 0.14);
}

body.admin-studio-shell .studio-area-card svg {
    grid-row: span 2;
    width: 52px;
    height: 52px;
    padding: 13px;
    color: #3b82f6;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #fff1f7);
}

body.admin-studio-shell .studio-area-card strong {
    align-self: end;
    min-width: 0;
    color: #24304a;
    font-size: 1.2rem;
    line-height: 1.2;
}

body.admin-studio-shell .studio-area-card span {
    grid-column: 2;
    font-size: 0.92rem;
    line-height: 1.45;
}

body.admin-studio-shell .studio-workspace-grid {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

body.admin-studio-shell .studio-control-panel,
body.admin-studio-shell .studio-editor-panel {
    border-radius: 26px;
}

body.admin-studio-shell .studio-control-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    padding: 20px;
}

body.admin-studio-shell .studio-editor-panel {
    min-width: 0;
    padding: 22px;
}

body.admin-studio-shell .studio-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e3ebf5;
}

body.admin-studio-shell .studio-panel-head strong {
    padding: 8px 12px;
    color: #9c3e64;
    border-radius: 999px;
    background: #ffe8f2;
}

body.admin-studio-shell .studio-stack-form,
body.admin-studio-shell .studio-settings-grid,
body.admin-studio-shell .studio-theme-grid,
body.admin-studio-shell .studio-block-form,
body.admin-studio-shell .studio-simple-row {
    display: grid;
    gap: 12px;
}

body.admin-studio-shell .studio-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.admin-studio-shell .studio-settings-grid .wide {
    grid-column: 1 / -1;
}

body.admin-studio-shell .studio-stack-form label,
body.admin-studio-shell .studio-settings-grid label,
body.admin-studio-shell .studio-block-form label,
body.admin-studio-shell .studio-simple-row label,
body.admin-studio-shell .studio-theme-card label {
    display: grid;
    gap: 7px;
    color: #394761;
    font-weight: 800;
}

body.admin-studio-shell .studio-stack-form input,
body.admin-studio-shell .studio-stack-form select,
body.admin-studio-shell .studio-stack-form textarea,
body.admin-studio-shell .studio-settings-grid input,
body.admin-studio-shell .studio-settings-grid textarea,
body.admin-studio-shell .studio-add-row input,
body.admin-studio-shell .studio-add-row select,
body.admin-studio-shell .studio-block-form input,
body.admin-studio-shell .studio-block-form select,
body.admin-studio-shell .studio-simple-row input,
body.admin-studio-shell .studio-theme-card input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 13px;
    color: #24304a;
    border: 1px solid #d8e3f0;
    border-radius: 14px;
    background: #f8fbff;
    font: inherit;
    font-weight: 800;
}

body.admin-studio-shell .studio-stack-form textarea,
body.admin-studio-shell .studio-settings-grid textarea {
    min-height: 116px;
    resize: vertical;
}

body.admin-studio-shell .studio-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e3ebf5;
    border-radius: 18px;
    background: #f8fbff;
}

body.admin-studio-shell .studio-menu-add {
    grid-template-columns: 1.1fr 1.4fr 0.8fr 80px auto;
}

body.admin-studio-shell .studio-column-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    background: #f2f7fd;
}

body.admin-studio-shell .studio-column-switcher a {
    display: grid;
    place-items: center;
    min-height: 42px;
    color: #526179;
    border-radius: 13px;
    text-decoration: none;
    font-weight: 900;
}

body.admin-studio-shell .studio-column-switcher a.is-active {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #7c6df8);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.22);
}

body.admin-studio-shell .studio-block-list,
body.admin-studio-shell .studio-simple-list {
    display: grid;
    gap: 12px;
}

body.admin-studio-shell .studio-block-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding: 14px;
    border: 1px solid #dbe5f1;
    border-radius: 20px;
    background: #fff;
}

body.admin-studio-shell .studio-block-row.is-disabled {
    background: #f9fbfe;
    opacity: 0.74;
}

body.admin-studio-shell .studio-block-form {
    grid-template-columns: minmax(160px, 1.15fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(130px, 0.75fr) auto auto;
    align-items: end;
}

body.admin-studio-shell .studio-block-title {
    display: grid;
    align-content: center;
    min-height: 48px;
}

body.admin-studio-shell .studio-block-title strong {
    color: #24304a;
    font-size: 1.02rem;
    line-height: 1.22;
}

body.admin-studio-shell .studio-drag {
    margin-top: 3px;
}

body.admin-studio-shell .studio-check {
    display: inline-flex !important;
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    gap: 8px !important;
    min-height: 48px;
    padding: 0 8px;
    white-space: nowrap;
}

body.admin-studio-shell .studio-check input {
    width: 18px !important;
    height: 18px !important;
    min-height: 0 !important;
    padding: 0 !important;
    accent-color: #f05282;
}

body.admin-studio-shell .studio-block-form button,
body.admin-studio-shell .studio-row-actions button,
body.admin-studio-shell .studio-simple-row button,
body.admin-studio-shell .studio-theme-card button {
    min-height: 44px;
    padding: 0 14px;
    color: #24304a;
    border: 1px solid #dbe5f1;
    border-radius: 13px;
    background: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

body.admin-studio-shell .studio-block-form > button {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #3b82f6, #7c6df8);
}

body.admin-studio-shell .studio-row-actions {
    display: flex;
    align-items: start;
    gap: 8px;
}

body.admin-studio-shell .studio-row-actions form {
    margin: 0;
}

body.admin-studio-shell .studio-row-actions .danger-text,
body.admin-studio-shell .studio-simple-row .danger-text {
    color: #d9416a;
    border-color: #ffd2df;
    background: #fff4f7;
}

body.admin-studio-shell .studio-simple-row {
    grid-template-columns: 42px 1.1fr 1.5fr 0.8fr 80px 96px auto auto;
    align-items: end;
    padding: 12px;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    background: #fff;
}

body.admin-studio-shell .studio-theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.admin-studio-shell .studio-theme-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
}

body.admin-studio-shell .studio-theme-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3ebf5;
}

body.admin-studio-shell .studio-theme-card h3 {
    margin: 0;
    color: #24304a;
}

body.admin-studio-shell .studio-theme-card input[type="color"] {
    height: 48px;
    padding: 6px;
}

body.admin-studio-shell .studio-theme-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px;
    border: 1px solid #dbe5f1;
    border-radius: 20px;
    background: #fff;
}

body.admin-studio-shell .studio-empty {
    padding: 28px;
    color: #6b7890;
    text-align: center;
    border: 1px dashed #cbd8e8;
    border-radius: 18px;
    background: #f8fbff;
    font-weight: 800;
}

@media (max-width: 1320px) {
    body.admin-studio-shell .studio-overview-grid,
    body.admin-studio-shell .studio-theme-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-studio-shell .studio-block-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-studio-shell .studio-simple-row,
    body.admin-studio-shell .studio-menu-add {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-studio-shell .studio-simple-row .studio-drag {
        grid-column: 1 / -1;
        width: max-content;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell .studio-workspace-grid,
    body.admin-studio-shell .studio-settings-grid,
    body.admin-studio-shell .studio-theme-grid {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-control-panel {
        position: static;
    }

    body.admin-studio-shell .studio-block-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    body.admin-studio-shell .studio-row-actions {
        grid-column: 2;
        flex-wrap: wrap;
    }
}

@media (max-width: 680px) {
    body.admin-studio-shell .studio-hero-panel,
    body.admin-studio-shell .studio-panel-head,
    body.admin-studio-shell .studio-theme-card header {
        align-items: stretch;
        flex-direction: column;
    }

    body.admin-studio-shell .studio-overview-grid,
    body.admin-studio-shell .studio-add-row,
    body.admin-studio-shell .studio-menu-add,
    body.admin-studio-shell .studio-block-form,
    body.admin-studio-shell .studio-simple-row {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-block-row {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-drag {
        width: 100%;
    }

    body.admin-studio-shell .studio-row-actions {
        grid-column: 1;
    }

    body.admin-studio-shell .studio-theme-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Compact admin workspace redesign requested 2026-06-17. */
body.admin-studio-shell {
    display: grid !important;
    grid-template-columns: 318px minmax(0, 1fr) !important;
    min-height: 100vh !important;
    padding: 0 !important;
    background:
        radial-gradient(circle at 9% 0%, rgba(59, 130, 246, 0.12), transparent 26rem),
        radial-gradient(circle at 92% 15%, rgba(236, 72, 153, 0.1), transparent 24rem),
        linear-gradient(180deg, #eef5fb 0%, #f8fbff 45%, #fffaf6 100%) !important;
}

body.admin-studio-shell .admin-section-sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    display: grid !important;
    grid-template-rows: auto auto auto minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 318px !important;
    height: 100vh !important;
    padding: 18px 16px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    color: #e7eef9 !important;
    border-right: 1px solid rgba(148, 163, 184, 0.22) !important;
    background: linear-gradient(180deg, #071120 0%, #0d192b 48%, #162236 100%) !important;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.18) !important;
}

body.admin-studio-shell .admin-sidebar-brand {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    padding-bottom: 16px !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
    text-decoration: none !important;
}

body.admin-studio-shell .admin-sidebar-brand > span {
    display: grid !important;
    place-items: center !important;
    width: 52px !important;
    height: 52px !important;
    color: #fff !important;
    border-radius: 15px !important;
    background: linear-gradient(135deg, #fb7185 0%, #fde047 50%, #60a5fa 100%) !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.24) !important;
}

body.admin-studio-shell .admin-sidebar-brand strong,
body.admin-studio-shell .admin-sidebar-user strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    color: #f8fafc !important;
    font-size: 1.04rem !important;
    line-height: 1.18 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-sidebar-brand small,
body.admin-studio-shell .admin-sidebar-user small {
    display: block !important;
    margin-top: 2px !important;
    overflow: hidden !important;
    color: #9eb1cb !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.24 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-sidebar-user {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    padding: 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.055) !important;
}

body.admin-studio-shell .admin-sidebar-user > svg {
    width: 38px !important;
    height: 38px !important;
    padding: 9px !important;
    color: #93c5fd !important;
    border: 1px solid rgba(147, 197, 253, 0.28) !important;
    border-radius: 13px !important;
    background: rgba(59, 130, 246, 0.13) !important;
}

body.admin-studio-shell .admin-sidebar-search {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

body.admin-studio-shell .admin-sidebar-search svg {
    width: 18px !important;
    height: 18px !important;
    color: #93c5fd !important;
}

body.admin-studio-shell .admin-sidebar-search input {
    width: 100% !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 !important;
    color: #e7eef9 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .admin-sidebar-search input::placeholder {
    color: #94a3b8 !important;
}

body.admin-studio-shell .admin-nav-accordion {
    display: grid !important;
    align-content: start !important;
    gap: 10px !important;
    padding: 4px 0 18px !important;
}

body.admin-studio-shell .admin-nav-group {
    min-width: 0 !important;
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 22px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)) !important;
    overflow: hidden !important;
}

body.admin-studio-shell .admin-nav-group[hidden] {
    display: none !important;
}

body.admin-studio-shell .admin-nav-group summary {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto 18px !important;
    gap: 11px !important;
    align-items: center !important;
    min-height: 72px !important;
    padding: 12px 14px !important;
    color: #f8fafc !important;
    cursor: pointer !important;
    list-style: none !important;
}

body.admin-studio-shell .admin-nav-group summary::-webkit-details-marker {
    display: none !important;
}

body.admin-studio-shell .admin-nav-group-icon {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    color: #93c5fd !important;
    border: 1px solid rgba(147, 197, 253, 0.28) !important;
    border-radius: 15px !important;
    background: rgba(59, 130, 246, 0.16) !important;
}

body.admin-studio-shell .admin-nav-group-icon svg {
    width: 21px !important;
    height: 21px !important;
}

body.admin-studio-shell .nav-group-title {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #f8fafc !important;
    font-size: 1.02rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-nav-group summary b {
    display: grid !important;
    place-items: center !important;
    min-width: 28px !important;
    height: 28px !important;
    padding: 0 8px !important;
    color: #cbd5e1 !important;
    border-radius: 999px !important;
    background: rgba(148, 163, 184, 0.12) !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-nav-chevron {
    width: 18px !important;
    height: 18px !important;
    color: #b7c7dc !important;
    transition: transform 0.18s ease !important;
}

body.admin-studio-shell .admin-nav-group[open] .admin-nav-chevron {
    transform: rotate(180deg) !important;
}

body.admin-studio-shell .admin-nav-links {
    display: grid !important;
    gap: 4px !important;
    padding: 0 12px 14px 78px !important;
}

body.admin-studio-shell .admin-nav-links a {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    min-height: 42px !important;
    padding: 8px 10px !important;
    color: #d7e1ef !important;
    border: 1px solid transparent !important;
    border-radius: 13px !important;
    text-decoration: none !important;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease !important;
}

body.admin-studio-shell .admin-nav-links a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body.admin-studio-shell .admin-nav-links a.is-active {
    color: #fff !important;
    border-color: rgba(147, 197, 253, 0.22) !important;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.18), rgba(255, 255, 255, 0.08)) !important;
    box-shadow: inset 4px 0 0 #93c5fd !important;
}

body.admin-studio-shell .admin-nav-links a svg {
    width: 18px !important;
    height: 18px !important;
    color: #93c5fd !important;
}

body.admin-studio-shell .admin-nav-links a span {
    min-width: 0 !important;
    overflow: hidden !important;
    font-size: 0.89rem !important;
    font-weight: 900 !important;
    line-height: 1.18 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-nav-group .nav-group-title {
    display: -webkit-box !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
}

body.admin-studio-shell .admin-main {
    padding: 18px clamp(16px, 2vw, 28px) 38px !important;
}

body.admin-studio-shell .admin-main > :not(.admin-modal):not(.image-crop-modal):not(.admin-menu-backdrop) {
    max-width: 1540px !important;
}

body.admin-studio-shell .admin-studio-topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    border-radius: 18px !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.055) !important;
}

body.admin-studio-shell .admin-studio-title span {
    font-size: 0.72rem !important;
}

body.admin-studio-shell .admin-studio-title h1 {
    margin: 2px 0 !important;
    font-size: clamp(1.34rem, 1.65vw, 1.86rem) !important;
    line-height: 1.12 !important;
}

body.admin-studio-shell .admin-studio-title p {
    max-width: 720px !important;
    font-size: 0.82rem !important;
    line-height: 1.36 !important;
}

body.admin-studio-shell .admin-context-nav {
    display: none !important;
}

body.admin-studio-shell .ghost-button,
body.admin-studio-shell .admin-button,
body.admin-studio-shell button {
    min-height: 38px;
    font-size: 0.84rem;
}

body.admin-studio-shell .admin-studio-actions {
    gap: 8px !important;
}

body.admin-studio-shell .admin-studio-actions .ghost-button {
    min-height: 38px !important;
    padding: 0 12px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-list-panel,
body.admin-studio-shell .admin-panel {
    padding: 18px !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .content-toolbar {
    gap: 12px !important;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
}

body.admin-studio-shell .content-toolbar-copy h2 {
    font-size: clamp(1.08rem, 1.35vw, 1.36rem) !important;
}

body.admin-studio-shell .content-toolbar-copy p {
    font-size: 0.78rem !important;
}

body.admin-studio-shell .content-list-panel .admin-table th,
body.admin-studio-shell .content-list-panel .admin-table td {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
}

body.admin-studio-shell .studio-hero-panel {
    display: none !important;
}

body.admin-studio-shell .studio-hero-panel h2,
body.admin-studio-shell .studio-panel-head h3,
body.admin-studio-shell .studio-control-panel h3 {
    font-size: clamp(1.18rem, 1.5vw, 1.62rem) !important;
}

body.admin-studio-shell .studio-hero-panel p,
body.admin-studio-shell .studio-control-panel p,
body.admin-studio-shell .studio-area-card span,
body.admin-studio-shell .studio-block-title small {
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .studio-layout-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

body.admin-studio-shell .studio-map-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px 10px;
    align-items: center;
    min-width: 0;
    min-height: 116px;
    padding: 14px;
    color: #1e293b;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.055);
}

body.admin-studio-shell .studio-map-card svg {
    grid-row: span 3;
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 14px;
    color: #2563eb;
    background: #eff6ff;
}

body.admin-studio-shell .studio-map-card.is-left svg {
    color: #be4772;
    background: #fff1f7;
}

body.admin-studio-shell .studio-map-card.is-center svg {
    color: #0f766e;
    background: #ecfdf5;
}

body.admin-studio-shell .studio-map-card.is-right svg,
body.admin-studio-shell .studio-map-card.is-source svg {
    color: #2563eb;
    background: #eff6ff;
}

body.admin-studio-shell .studio-map-card span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
}

body.admin-studio-shell .studio-map-card strong {
    min-width: 0;
    color: #17233b;
    font-size: 1.04rem;
    line-height: 1.16;
}

body.admin-studio-shell .studio-map-card small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
}

body.admin-studio-shell .studio-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 10px !important;
}

body.admin-studio-shell .studio-area-card {
    min-height: 110px !important;
    padding: 14px !important;
    border-radius: 18px !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
}

body.admin-studio-shell .studio-area-card svg {
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .studio-area-card strong {
    font-size: 1rem !important;
}

body.admin-studio-shell .studio-workspace-grid {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) !important;
    gap: 14px !important;
}

body.admin-studio-shell .studio-control-panel,
body.admin-studio-shell .studio-editor-panel,
body.admin-studio-shell .studio-theme-card {
    border-radius: 18px !important;
}

body.admin-studio-shell .studio-control-panel {
    top: 14px !important;
    gap: 12px !important;
    padding: 16px !important;
}

body.admin-studio-shell .studio-editor-panel {
    padding: 16px !important;
}

body.admin-studio-shell .studio-panel-head {
    margin-bottom: 12px !important;
    padding-bottom: 12px !important;
}

body.admin-studio-shell .studio-panel-head strong {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-relation-strip {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #dbe5f1;
    border-left-width: 5px;
    border-radius: 16px;
    background: #f8fbff;
}

body.admin-studio-shell .studio-relation-strip.is-left {
    border-left-color: #f9a8d4;
}

body.admin-studio-shell .studio-relation-strip.is-center {
    border-left-color: #5eead4;
}

body.admin-studio-shell .studio-relation-strip.is-right {
    border-left-color: #93c5fd;
}

body.admin-studio-shell .studio-relation-strip > svg {
    width: 38px;
    height: 38px;
    padding: 9px;
    color: #2563eb;
    border-radius: 13px;
    background: #eff6ff;
}

body.admin-studio-shell .studio-relation-strip strong,
body.admin-studio-shell .studio-relation-strip span {
    display: block;
}

body.admin-studio-shell .studio-relation-strip strong {
    color: #17233b;
    font-size: 0.9rem;
    line-height: 1.22;
}

body.admin-studio-shell .studio-relation-strip span {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.35;
}

body.admin-studio-shell .studio-relation-strip .ghost-button {
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-stack-form,
body.admin-studio-shell .studio-settings-grid,
body.admin-studio-shell .studio-theme-grid,
body.admin-studio-shell .studio-block-form,
body.admin-studio-shell .studio-simple-row {
    gap: 9px !important;
}

body.admin-studio-shell .studio-stack-form label,
body.admin-studio-shell .studio-settings-grid label,
body.admin-studio-shell .studio-block-form label,
body.admin-studio-shell .studio-simple-row label,
body.admin-studio-shell .studio-theme-card label {
    gap: 5px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-stack-form input,
body.admin-studio-shell .studio-stack-form select,
body.admin-studio-shell .studio-stack-form textarea,
body.admin-studio-shell .studio-settings-grid input,
body.admin-studio-shell .studio-settings-grid textarea,
body.admin-studio-shell .studio-add-row input,
body.admin-studio-shell .studio-add-row select,
body.admin-studio-shell .studio-block-form input,
body.admin-studio-shell .studio-block-form select,
body.admin-studio-shell .studio-simple-row input,
body.admin-studio-shell .studio-theme-card input {
    min-height: 40px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .studio-add-row {
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding: 10px !important;
    border-radius: 15px !important;
}

body.admin-studio-shell .studio-block-list,
body.admin-studio-shell .studio-simple-list {
    gap: 9px !important;
}

body.admin-studio-shell .studio-block-row {
    grid-template-columns: 36px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 16px !important;
}

body.admin-studio-shell .studio-block-form {
    grid-template-columns: minmax(170px, 1.05fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(126px, 0.7fr) auto auto !important;
    gap: 8px !important;
}

body.admin-studio-shell .studio-block-title {
    min-height: 40px !important;
}

body.admin-studio-shell .studio-block-title strong {
    font-size: 0.9rem !important;
}

body.admin-studio-shell .studio-drag {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin-top: 2px !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .studio-check {
    min-height: 40px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-block-form button,
body.admin-studio-shell .studio-row-actions button,
body.admin-studio-shell .studio-simple-row button,
body.admin-studio-shell .studio-theme-card button {
    min-height: 36px !important;
    padding: 0 11px !important;
    border-radius: 11px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-row-actions {
    grid-column: 2 !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .studio-simple-row {
    grid-template-columns: 36px minmax(120px, 1.1fr) minmax(160px, 1.4fr) minmax(110px, 0.8fr) 64px 82px auto auto !important;
    gap: 8px !important;
    padding: 10px !important;
    border-radius: 15px !important;
}

body.admin-studio-shell .studio-theme-grid {
    gap: 12px !important;
}

body.admin-studio-shell .studio-theme-card {
    padding: 14px !important;
}

body.admin-studio-shell .studio-theme-card h3 {
    font-size: 1rem !important;
}

body.admin-studio-shell .studio-theme-actions {
    padding: 12px !important;
    border-radius: 16px !important;
}

@media (max-width: 1320px) {
    body.admin-studio-shell {
        grid-template-columns: 300px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .admin-section-sidebar {
        width: 300px !important;
    }

    body.admin-studio-shell .studio-layout-map {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.admin-studio-shell .studio-block-form,
    body.admin-studio-shell .studio-simple-row,
    body.admin-studio-shell .studio-menu-add {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1120px) {
    body.admin-studio-shell .studio-workspace-grid {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-control-panel {
        position: static !important;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell {
        display: block !important;
        padding-top: 74px !important;
    }

    body.admin-studio-shell .admin-mobile-header {
        display: flex !important;
        height: 74px !important;
        padding: 10px 14px !important;
    }

    body.admin-studio-shell .admin-section-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 150 !important;
        width: min(88vw, 360px) !important;
        height: 100vh !important;
        padding: 84px 14px 18px !important;
        transform: translateX(-105%) !important;
        transition: transform 0.22s ease !important;
    }

    body.admin-menu-open.admin-studio-shell .admin-section-sidebar {
        transform: translateX(0) !important;
    }

    body.admin-studio-shell .admin-main {
        padding: 14px 12px 28px !important;
    }

    body.admin-studio-shell .admin-studio-topbar {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 680px) {
    body.admin-studio-shell .admin-nav-group summary {
        min-height: 66px !important;
    }

    body.admin-studio-shell .admin-nav-links {
        padding-left: 66px !important;
    }

    body.admin-studio-shell .studio-layout-map,
    body.admin-studio-shell .studio-overview-grid,
    body.admin-studio-shell .studio-add-row,
    body.admin-studio-shell .studio-settings-grid,
    body.admin-studio-shell .studio-theme-grid,
    body.admin-studio-shell .studio-block-form,
    body.admin-studio-shell .studio-simple-row,
    body.admin-studio-shell .studio-menu-add {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-relation-strip {
        grid-template-columns: 36px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .studio-relation-strip .ghost-button {
        grid-column: 1 / -1 !important;
    }

    body.admin-studio-shell .studio-block-row {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-row-actions {
        grid-column: 1 !important;
        justify-content: flex-start !important;
    }
}

/* Column editor and sidebar compact pass. */
body.admin-studio-shell {
    grid-template-columns: 268px minmax(0, 1fr) !important;
}

body.admin-studio-shell .admin-section-sidebar {
    width: 268px !important;
    padding: 14px 12px !important;
    gap: 10px !important;
}

body.admin-studio-shell .admin-sidebar-brand {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
}

body.admin-studio-shell .admin-sidebar-brand > span {
    width: 42px !important;
    height: 42px !important;
    border-radius: 13px !important;
    font-size: 1.16rem !important;
}

body.admin-studio-shell .admin-sidebar-brand strong,
body.admin-studio-shell .admin-sidebar-user strong {
    font-size: 0.88rem !important;
}

body.admin-studio-shell .admin-sidebar-brand small,
body.admin-studio-shell .admin-sidebar-user small {
    font-size: 0.64rem !important;
}

body.admin-studio-shell .admin-sidebar-user {
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 9px !important;
    border-radius: 15px !important;
}

body.admin-studio-shell .admin-sidebar-user > svg {
    width: 32px !important;
    height: 32px !important;
    padding: 7px !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .admin-sidebar-search {
    min-height: 38px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .admin-sidebar-search input {
    height: 36px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .admin-nav-accordion {
    gap: 8px !important;
}

body.admin-studio-shell .admin-nav-group {
    border-radius: 17px !important;
}

body.admin-studio-shell .admin-nav-group summary {
    grid-template-columns: 36px minmax(0, 1fr) auto 16px !important;
    gap: 9px !important;
    min-height: 56px !important;
    padding: 9px 10px !important;
}

body.admin-studio-shell .admin-nav-group-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .admin-nav-group-icon svg {
    width: 18px !important;
    height: 18px !important;
}

body.admin-studio-shell .admin-nav-group .nav-group-title {
    font-size: 0.86rem !important;
    line-height: 1.14 !important;
}

body.admin-studio-shell .admin-nav-group summary b {
    min-width: 24px !important;
    height: 24px !important;
    padding: 0 7px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .admin-nav-chevron {
    width: 16px !important;
    height: 16px !important;
}

body.admin-studio-shell .admin-nav-links {
    gap: 3px !important;
    padding: 0 9px 10px 52px !important;
}

body.admin-studio-shell .admin-nav-links a {
    grid-template-columns: 18px minmax(0, 1fr) !important;
    gap: 8px !important;
    min-height: 34px !important;
    padding: 6px 8px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .admin-nav-links a svg {
    width: 15px !important;
    height: 15px !important;
}

body.admin-studio-shell .admin-nav-links a span {
    font-size: 0.76rem !important;
}

body.admin-studio-shell .admin-main {
    padding: 14px clamp(12px, 1.6vw, 22px) 34px !important;
}

body.admin-studio-shell .studio-workspace-grid.studio-workspace-grid-full {
    display: block !important;
}

body.admin-studio-shell .studio-workspace-grid.studio-workspace-grid-full .studio-editor-panel {
    width: 100% !important;
    max-width: none !important;
}

body.admin-studio-shell .studio-column-toolbar {
    display: grid;
    grid-template-columns: minmax(230px, max-content) minmax(260px, 360px);
    gap: 10px;
    align-items: start;
    margin-bottom: 12px;
}

body.admin-studio-shell .studio-layout-dropdown {
    position: relative;
    min-width: 0;
}

body.admin-studio-shell .studio-layout-dropdown summary {
    display: grid;
    grid-template-columns: 18px auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    color: #23304a;
    border: 1px solid #dbe5f1;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    list-style: none;
}

body.admin-studio-shell .studio-layout-dropdown summary::-webkit-details-marker {
    display: none;
}

body.admin-studio-shell .studio-layout-dropdown summary svg {
    width: 17px;
    height: 17px;
    color: #3b82f6;
}

body.admin-studio-shell .studio-layout-dropdown summary span {
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

body.admin-studio-shell .studio-layout-dropdown summary small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-layout-form {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto;
    gap: 8px;
    width: min(520px, calc(100vw - 320px));
    padding: 10px;
    border: 1px solid #dbe5f1;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

body.admin-studio-shell .studio-layout-dropdown:not([open]) .studio-layout-form {
    display: none;
}

body.admin-studio-shell .studio-layout-form label {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
}

body.admin-studio-shell .studio-layout-form select {
    width: 100%;
    min-height: 38px;
    padding: 7px 10px;
    color: #23304a;
    border: 1px solid #dbe5f1;
    border-radius: 11px;
    background: #f8fbff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
}

body.admin-studio-shell .studio-layout-form button {
    align-self: end;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .studio-column-toolbar .studio-column-switcher {
    align-self: start;
    padding: 5px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .studio-column-toolbar .studio-column-switcher a {
    min-height: 34px !important;
    border-radius: 10px !important;
    font-size: 0.76rem !important;
}

body.admin-studio-shell .studio-block-row {
    grid-template-columns: 34px minmax(0, 1fr) !important;
}

body.admin-studio-shell .studio-block-form {
    grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(128px, 0.78fr) minmax(82px, auto) auto !important;
}

@media (max-width: 1320px) {
    body.admin-studio-shell {
        grid-template-columns: 248px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .admin-section-sidebar {
        width: 248px !important;
    }

    body.admin-studio-shell .studio-layout-form {
        width: min(500px, calc(100vw - 280px));
    }
}

@media (max-width: 1120px) {
    body.admin-studio-shell .studio-column-toolbar {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-layout-form {
        position: static;
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell .admin-section-sidebar {
        width: min(86vw, 320px) !important;
        padding: 82px 12px 18px !important;
    }
}

@media (max-width: 680px) {
    body.admin-studio-shell .admin-nav-links {
        padding-left: 52px !important;
    }

    body.admin-studio-shell .studio-layout-form {
        grid-template-columns: 1fr;
    }
}

/* Final admin usability pass: unclipped sidebar accordions and compact modal system. */
body.admin-studio-shell .admin-nav-group,
body.admin-studio-shell .admin-nav-group[open] {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    contain: none !important;
    box-sizing: border-box !important;
}

body.admin-studio-shell .admin-nav-accordion,
body.admin-studio-shell .admin-nav-group summary {
    width: 100% !important;
    box-sizing: border-box !important;
}

body.admin-studio-shell .admin-nav-group:not([open]) .admin-nav-links {
    display: none !important;
}

body.admin-studio-shell .admin-nav-group[open] .admin-nav-links {
    display: grid !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 2px !important;
    padding-bottom: 12px !important;
}

body.admin-studio-shell .admin-nav-links a {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.admin-studio-shell .admin-nav-links a span {
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
}

body.admin-studio-shell .admin-modal {
    padding: clamp(12px, 1.7vw, 22px) !important;
}

body.admin-studio-shell .admin-modal.is-open {
    display: grid !important;
    place-items: center !important;
}

body.admin-studio-shell .admin-modal-backdrop,
body.admin-studio-shell .image-crop-backdrop {
    background:
        radial-gradient(circle at 18% 12%, rgba(96, 165, 250, 0.24), transparent 28rem),
        radial-gradient(circle at 84% 18%, rgba(244, 114, 182, 0.22), transparent 26rem),
        rgba(15, 23, 42, 0.46) !important;
    backdrop-filter: blur(7px) saturate(1.08) !important;
}

body.admin-studio-shell .admin-modal-card {
    width: min(980px, calc(100vw - 32px)) !important;
    max-height: min(780px, calc(100svh - 26px)) !important;
    border: 1px solid rgba(191, 219, 254, 0.88) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.99)),
        #ffffff !important;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26) !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 0 !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #dbe7f5 !important;
    border-radius: 22px 22px 0 0 !important;
    background:
        linear-gradient(135deg, rgba(255, 241, 247, 0.98), rgba(239, 246, 255, 0.98) 56%, rgba(236, 253, 245, 0.95)),
        #ffffff !important;
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.08) !important;
}

body.admin-studio-shell .admin-modal-head .panel-kicker,
body.admin-studio-shell .image-crop-card .panel-kicker {
    display: inline-flex !important;
    min-height: 22px !important;
    align-items: center !important;
    padding: 0 9px !important;
    color: #c73f72 !important;
    border: 1px solid rgba(251, 207, 232, 0.95) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    max-width: min(700px, calc(100vw - 128px)) !important;
    margin-top: 5px !important;
    color: #1f2a44 !important;
    font-size: clamp(1.26rem, 1.7vw, 1.68rem) !important;
    line-height: 1.14 !important;
}

body.admin-studio-shell .admin-modal-head .icon-button {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
    color: #22304b !important;
    border: 1px solid #d7e3f3 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
}

body.admin-studio-shell .admin-modal-head .icon-button svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.5 !important;
}

body.admin-studio-shell .admin-modal-form {
    min-height: 0 !important;
    max-height: calc(min(780px, calc(100svh - 26px)) - 72px) !important;
    padding: 14px 18px 0 !important;
    overflow: auto !important;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%) !important;
}

body.admin-studio-shell .admin-form-sections {
    display: grid !important;
    gap: 12px !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 12px !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 17px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 252, 255, 0.96)),
        #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04) !important;
}

body.admin-studio-shell .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(219, 231, 245, 0.88) !important;
}

body.admin-studio-shell .admin-form-section-head > svg {
    width: 38px !important;
    height: 38px !important;
    padding: 9px !important;
    color: #ffffff !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    box-shadow: 0 12px 22px rgba(59, 130, 246, 0.18) !important;
}

body.admin-studio-shell .admin-form-section-head strong {
    color: #22304b !important;
    font-size: 0.95rem !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .admin-form-section-head small {
    margin-top: 1px !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    line-height: 1.28 !important;
}

body.admin-studio-shell .admin-form-grid {
    gap: 10px 12px !important;
}

body.admin-studio-shell .admin-field {
    gap: 5px !important;
    color: #334155 !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-field b {
    color: #e04678 !important;
}

body.admin-studio-shell .admin-form input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.admin-studio-shell .admin-form select,
body.admin-studio-shell .admin-form textarea {
    min-height: 38px !important;
    padding: 8px 10px !important;
    color: #22304b !important;
    border: 1px solid #d7e3f3 !important;
    border-radius: 12px !important;
    background: #fbfdff !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

body.admin-studio-shell .admin-form textarea {
    min-height: 118px !important;
    line-height: 1.45 !important;
}

body.admin-studio-shell .admin-form input:focus,
body.admin-studio-shell .admin-form select:focus,
body.admin-studio-shell .admin-form textarea:focus {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.28) !important;
    outline: 0 !important;
}

body.admin-studio-shell .field-hint,
body.admin-studio-shell .field-help {
    color: #64748b !important;
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .admin-modal-actions {
    bottom: 0 !important;
    z-index: 4 !important;
    margin: 14px -18px 0 !important;
    padding: 10px 18px !important;
    border-top: 1px solid #dbe7f5 !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 247, 251, 0.96)),
        #ffffff !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.07) !important;
    backdrop-filter: blur(12px) !important;
}

body.admin-studio-shell .admin-modal-actions .ghost-button,
body.admin-studio-shell .admin-modal-actions .admin-button {
    min-height: 40px !important;
    padding: 0 16px !important;
    border-radius: 13px !important;
    font-size: 0.86rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-modal-actions .admin-button.primary {
    background: linear-gradient(135deg, #e84f84, #ff8265) !important;
    box-shadow: 0 12px 24px rgba(232, 79, 132, 0.2) !important;
}

body.admin-studio-shell .admin-image-preview,
body.admin-studio-shell .admin-gallery-preview .gallery-image-card {
    min-height: 64px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .admin-image-preview img,
body.admin-studio-shell .admin-gallery-preview img {
    width: 56px !important;
    height: 56px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .image-crop-modal {
    padding: clamp(12px, 1.8vw, 22px) !important;
}

body.admin-studio-shell .image-crop-card {
    width: min(720px, calc(100vw - 32px)) !important;
    max-height: calc(100svh - 28px) !important;
    border: 1px solid rgba(191, 219, 254, 0.9) !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28) !important;
    overflow: hidden !important;
}

body.admin-studio-shell .image-crop-card header,
body.admin-studio-shell .image-crop-card footer {
    padding: 12px 16px !important;
    background: linear-gradient(135deg, #fff1f7, #eff6ff) !important;
}

body.admin-studio-shell .image-crop-card h2 {
    font-size: 1.2rem !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .image-crop-stage-wrap {
    width: min(100%, 980px) !important;
    margin: 6px auto !important;
    padding: 8px !important;
    max-height: none !important;
}

body.admin-studio-shell .image-crop-stage-wrap.is-portrait {
    width: min(100%, 480px) !important;
}

body.admin-studio-shell .image-crop-stage-wrap.is-square {
    width: min(100%, 620px) !important;
}

body.admin-studio-shell .image-crop-stage-wrap.is-landscape {
    width: min(100%, 980px) !important;
}

body.admin-studio-shell .image-crop-card footer .ghost-button,
body.admin-studio-shell .image-crop-card footer .admin-button {
    min-height: 40px !important;
    border-radius: 13px !important;
    font-size: 0.86rem !important;
}

body.admin-studio-shell .swal2-popup {
    width: min(430px, calc(100vw - 28px)) !important;
    border-radius: 22px !important;
    padding: 18px !important;
    border: 1px solid #dbe7f5 !important;
    background:
        linear-gradient(180deg, #ffffff, #f8fbff),
        #ffffff !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22) !important;
}

body.admin-studio-shell .swal2-title {
    color: #22304b !important;
    font-size: 1.22rem !important;
    line-height: 1.22 !important;
}

body.admin-studio-shell .swal2-html-container {
    color: #64748b !important;
    font-size: 0.88rem !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-modal {
        padding: 8px !important;
    }

    body.admin-studio-shell .admin-modal-card {
        width: calc(100vw - 16px) !important;
        max-height: calc(100svh - 16px) !important;
        border-radius: 18px !important;
    }

    body.admin-studio-shell .admin-modal-head {
        padding: 11px 12px !important;
        border-radius: 18px 18px 0 0 !important;
    }

    body.admin-studio-shell .admin-modal-head h2 {
        max-width: calc(100vw - 94px) !important;
        font-size: clamp(1.16rem, 5.4vw, 1.44rem) !important;
    }

    body.admin-studio-shell .admin-modal-head .icon-button {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    body.admin-studio-shell .admin-modal-form {
        max-height: calc(100svh - 92px) !important;
        padding: 10px 10px 0 !important;
    }

    body.admin-studio-shell .admin-form-section {
        padding: 10px !important;
        border-radius: 15px !important;
    }

    body.admin-studio-shell .admin-form-grid {
        grid-template-columns: 1fr !important;
        gap: 9px !important;
    }

    body.admin-studio-shell .admin-modal-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        margin: 12px -10px 0 !important;
        padding: 9px 10px calc(9px + env(safe-area-inset-bottom)) !important;
    }

    body.admin-studio-shell .admin-modal-actions .ghost-button,
    body.admin-studio-shell .admin-modal-actions .admin-button {
        width: 100% !important;
        min-height: 42px !important;
        padding: 0 10px !important;
        font-size: 0.82rem !important;
    }

    body.admin-studio-shell .admin-nav-group[open] .admin-nav-links {
        padding-left: 48px !important;
    }
}

/* Unified Website Studio sidebar: all website structure and content live in one connected menu. */
body.admin-studio-shell {
    grid-template-columns: 282px minmax(0, 1fr) !important;
}

body.admin-studio-shell .admin-section-sidebar {
    width: 282px !important;
    padding: 14px 12px !important;
    gap: 10px !important;
}

body.admin-studio-shell .admin-studio-nav {
    display: grid !important;
    gap: 10px !important;
    align-content: start !important;
    padding: 2px 0 18px !important;
}

body.admin-studio-shell .admin-studio-nav-hub {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
    min-height: 48px !important;
    padding: 8px 10px !important;
    color: #f8fafc !important;
    border: 1px solid rgba(147, 197, 253, 0.32) !important;
    border-left: 4px solid #93c5fd !important;
    border-radius: 16px !important;
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(255, 255, 255, 0.055)),
        rgba(255, 255, 255, 0.045) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.admin-studio-shell .admin-studio-nav-hub > span,
body.admin-studio-shell .admin-studio-nav-section-head > span {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    color: #93c5fd !important;
    border: 1px solid rgba(147, 197, 253, 0.24) !important;
    border-radius: 11px !important;
    background: rgba(59, 130, 246, 0.14) !important;
}

body.admin-studio-shell .admin-studio-nav-section-head > span {
    width: 24px !important;
    height: 24px !important;
    border-radius: 8px !important;
}

body.admin-studio-shell .admin-studio-nav-hub svg,
body.admin-studio-shell .admin-studio-nav-section-head svg {
    width: 17px !important;
    height: 17px !important;
    stroke-width: 2.25 !important;
}

body.admin-studio-shell .admin-studio-nav-section-head svg {
    width: 13px !important;
    height: 13px !important;
}

body.admin-studio-shell .admin-studio-nav-hub strong {
    display: block !important;
    min-width: 0 !important;
    overflow: hidden !important;
    color: #f8fafc !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
    line-height: 1.18 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-studio-nav-hub small {
    display: none !important;
    margin-top: 2px !important;
    overflow: hidden !important;
    color: #a9bad2 !important;
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-studio-nav-hub b,
body.admin-studio-shell .admin-studio-nav-section-head b {
    display: grid !important;
    place-items: center !important;
    min-width: 23px !important;
    height: 23px !important;
    padding: 0 7px !important;
    color: #cbd5e1 !important;
    border-radius: 999px !important;
    background: rgba(148, 163, 184, 0.13) !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-studio-nav-hub b {
    display: none !important;
}

body.admin-studio-shell .admin-studio-nav-hub {
    position: relative !important;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    min-height: 40px !important;
    margin: 7px 0 5px !important;
    padding: 6px 9px !important;
    gap: 8px !important;
    color: #fef3c7 !important;
    border: 1px solid rgba(250, 204, 21, 0.48) !important;
    border-left: 4px solid #facc15 !important;
    border-radius: 12px !important;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(251, 191, 36, 0.055) 64%, rgba(15, 23, 42, 0.18)),
        rgba(15, 23, 42, 0.22) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 5px 16px rgba(15, 23, 42, 0.12) !important;
    cursor: default !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body.admin-studio-shell .admin-studio-nav-hub::after {
    display: none !important;
}

body.admin-studio-shell .admin-studio-nav-hub > span {
    width: 28px !important;
    height: 28px !important;
    color: #fde68a !important;
    border: 1px solid rgba(253, 230, 138, 0.38) !important;
    border-radius: 9px !important;
    background:
        linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(120, 53, 15, 0.28)),
        rgba(15, 23, 42, 0.35) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.admin-studio-shell .admin-studio-nav-hub svg {
    width: 15px !important;
    height: 15px !important;
    stroke-width: 2.2 !important;
}

body.admin-studio-shell .admin-studio-nav-hub strong {
    color: #fff7d6 !important;
    font-size: 0.77rem !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    text-shadow: 0 1px 0 rgba(15, 23, 42, 0.55) !important;
}

body.admin-studio-shell .admin-studio-nav-section {
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 5px 0 8px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .admin-studio-nav-section[hidden],
body.admin-studio-shell .admin-studio-nav-item[hidden] {
    display: none !important;
}

body.admin-studio-shell .admin-studio-nav-section.is-active-section {
    border-bottom-color: rgba(147, 197, 253, 0.34) !important;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.08), transparent 72%) !important;
}

body.admin-studio-shell .admin-studio-nav-section-head {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) auto !important;
    gap: 7px !important;
    align-items: center !important;
    min-height: 28px !important;
    padding: 2px 4px !important;
}

body.admin-studio-shell .admin-studio-nav-section:nth-of-type(3n + 1) .admin-studio-nav-section-head > span {
    color: #93c5fd !important;
    background: rgba(59, 130, 246, 0.14) !important;
}

body.admin-studio-shell .admin-studio-nav-section:nth-of-type(3n + 2) .admin-studio-nav-section-head > span {
    color: #f9a8d4 !important;
    border-color: rgba(249, 168, 212, 0.28) !important;
    background: rgba(236, 72, 153, 0.13) !important;
}

body.admin-studio-shell .admin-studio-nav-section:nth-of-type(3n) .admin-studio-nav-section-head > span {
    color: #99f6e4 !important;
    border-color: rgba(153, 246, 228, 0.24) !important;
    background: rgba(20, 184, 166, 0.12) !important;
}

body.admin-studio-shell .admin-studio-nav-section-head strong {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #edf5ff !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    line-height: 1.16 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-studio-nav-list {
    display: grid !important;
    gap: 3px !important;
    padding-left: 34px !important;
}

body.admin-studio-shell .admin-studio-nav-item {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 17px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
    min-height: 29px !important;
    padding: 4px 8px !important;
    color: #d7e1ef !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    text-decoration: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease !important;
}

body.admin-studio-shell .admin-studio-nav-item::before {
    content: "" !important;
    position: absolute !important;
    top: 8px !important;
    bottom: 8px !important;
    left: -16px !important;
    width: 1px !important;
    background: rgba(147, 197, 253, 0.16) !important;
}

body.admin-studio-shell .admin-studio-nav-item svg {
    width: 15px !important;
    height: 15px !important;
    color: #93c5fd !important;
    stroke-width: 2.2 !important;
}

body.admin-studio-shell .admin-studio-nav-item span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-studio-nav-item:hover {
    color: #ffffff !important;
    border-color: rgba(147, 197, 253, 0.18) !important;
    background: rgba(255, 255, 255, 0.075) !important;
    transform: translateX(2px) !important;
}

body.admin-studio-shell .admin-studio-nav-item.is-active {
    color: #ffffff !important;
    border-color: rgba(147, 197, 253, 0.36) !important;
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.24), rgba(255, 255, 255, 0.07)),
        rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 3px 0 0 #93c5fd !important;
}

body.admin-studio-shell .admin-studio-nav-item.is-active svg {
    color: #bfdbfe !important;
}

body.admin-studio-shell .admin-studio-nav-tree {
    display: grid !important;
    gap: 3px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .admin-studio-nav-tree[hidden],
body.admin-studio-shell .admin-studio-nav-tree [hidden] {
    display: none !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 17px minmax(0, 1fr) auto 14px !important;
    gap: 8px !important;
    align-items: center !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
    color: #d7e1ef !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
    list-style: none !important;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
}

body.admin-studio-shell a.admin-studio-nav-tree-head {
    text-decoration: none !important;
}

body.admin-studio-shell .admin-studio-nav-tree-static > .admin-studio-nav-tree-head {
    grid-template-columns: 17px minmax(0, 1fr) auto !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head::-webkit-details-marker {
    display: none !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head::before {
    content: "" !important;
    position: absolute !important;
    top: 8px !important;
    bottom: 8px !important;
    left: -16px !important;
    width: 1px !important;
    background: rgba(147, 197, 253, 0.16) !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head > svg:not(.admin-studio-nav-tree-chevron) {
    width: 15px !important;
    height: 15px !important;
    color: #93c5fd !important;
    stroke-width: 2.2 !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head b {
    min-width: 22px !important;
    padding: 1px 6px !important;
    color: #bfdbfe !important;
    border: 1px solid rgba(147, 197, 253, 0.14) !important;
    border-radius: 999px !important;
    background: rgba(147, 197, 253, 0.10) !important;
    font-size: 0.62rem !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

body.admin-studio-shell .admin-studio-nav-tree-chevron {
    width: 14px !important;
    height: 14px !important;
    color: #bfd3e8 !important;
    transition: transform 0.16s ease !important;
}

body.admin-studio-shell .admin-studio-nav-tree[open] > .admin-studio-nav-tree-head .admin-studio-nav-tree-chevron {
    transform: rotate(180deg) !important;
}

body.admin-studio-shell .admin-studio-nav-tree-head:hover,
body.admin-studio-shell .admin-studio-nav-tree.is-active > .admin-studio-nav-tree-head {
    color: #ffffff !important;
    border-color: rgba(147, 197, 253, 0.25) !important;
    background: rgba(255, 255, 255, 0.075) !important;
}

body.admin-studio-shell .admin-studio-nav-tree.is-active > .admin-studio-nav-tree-head {
    box-shadow: inset 3px 0 0 #93c5fd !important;
}

body.admin-studio-shell .admin-studio-nav-children {
    display: grid !important;
    gap: 3px !important;
    margin: 2px 0 2px 12px !important;
    padding-left: 10px !important;
    border-left: 1px solid rgba(147, 197, 253, 0.18) !important;
}

body.admin-studio-shell .admin-studio-nav-depth-1 > .admin-studio-nav-tree-head,
body.admin-studio-shell .admin-studio-nav-depth-1.admin-studio-nav-item {
    min-height: 28px !important;
    font-size: 0.69rem !important;
}

body.admin-studio-shell .admin-studio-nav-depth-2 > .admin-studio-nav-tree-head,
body.admin-studio-shell .admin-studio-nav-depth-2.admin-studio-nav-item {
    min-height: 26px !important;
    padding-block: 3px !important;
    color: #c6d5e8 !important;
    font-size: 0.66rem !important;
}

body.admin-studio-shell .admin-context-nav {
    grid-template-columns: minmax(168px, auto) minmax(0, 1fr) !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .admin-context-nav > div span {
    color: #d94b7d !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-context-nav > div strong {
    color: #1f2a44 !important;
    font-size: 0.92rem !important;
    line-height: 1.16 !important;
}

body.admin-studio-shell .admin-context-nav nav {
    gap: 6px !important;
}

body.admin-studio-shell .admin-context-nav a {
    min-height: 34px !important;
    padding: 0 10px !important;
    border-radius: 11px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .admin-context-nav a svg {
    width: 15px !important;
    height: 15px !important;
}

@media (max-width: 1320px) {
    body.admin-studio-shell {
        grid-template-columns: 264px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .admin-section-sidebar {
        width: 264px !important;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell .admin-section-sidebar {
        width: min(86vw, 310px) !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-studio-nav-list {
        padding-left: 38px !important;
    }

    body.admin-studio-shell .admin-studio-nav-item {
        min-height: 34px !important;
        font-size: 0.78rem !important;
    }

    body.admin-studio-shell .admin-context-nav {
        grid-template-columns: 1fr !important;
    }
}

/* New admin workbench flow. This replaces the old dashboard-as-directory pattern. */
body.admin-studio-shell .admin-studio-nav-section-head {
    text-decoration: none !important;
}

body.admin-studio-shell .flow-hero,
body.admin-studio-shell .flow-steps,
body.admin-studio-shell .flow-board,
body.admin-studio-shell .flow-layout-status,
body.admin-studio-shell .flow-module-section {
    width: min(100%, 1420px);
    margin-inline: auto;
}

body.admin-studio-shell .flow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 22px 24px;
    border: 1px solid #dbe6f3;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 254, 0.88)),
        linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(244, 114, 182, 0.1));
    box-shadow: 0 18px 46px rgba(38, 55, 86, 0.08);
}

body.admin-studio-shell .flow-tone-pink {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 250, 0.9)),
        linear-gradient(135deg, rgba(244, 114, 182, 0.16), rgba(251, 146, 60, 0.1));
}

body.admin-studio-shell .flow-tone-mint {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 253, 248, 0.9)),
        linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(96, 165, 250, 0.1));
}

body.admin-studio-shell .flow-tone-violet {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 247, 255, 0.9)),
        linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(244, 114, 182, 0.1));
}

body.admin-studio-shell .flow-tone-amber {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 252, 241, 0.9)),
        linear-gradient(135deg, rgba(251, 191, 36, 0.17), rgba(56, 189, 248, 0.09));
}

body.admin-studio-shell .flow-tone-slate {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 252, 0.9)),
        linear-gradient(135deg, rgba(100, 116, 139, 0.12), rgba(96, 165, 250, 0.1));
}

body.admin-studio-shell .flow-eyebrow,
body.admin-studio-shell .flow-panel-heading > span {
    display: inline-flex;
    width: max-content;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid #ffc7db;
    border-radius: 999px;
    background: #fff5fa;
    color: #cf3f73;
    font-size: 0.76rem;
    font-weight: 900;
}

body.admin-studio-shell .flow-hero h2 {
    margin: 8px 0 5px;
    color: #1f2a44;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    line-height: 1.12;
}

body.admin-studio-shell .flow-hero p,
body.admin-studio-shell .flow-panel-heading p {
    max-width: 820px;
    margin: 0;
    color: #657189;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.55;
}

body.admin-studio-shell .flow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

body.admin-studio-shell .flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

body.admin-studio-shell .flow-steps article {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid #dbe6f3;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(38, 55, 86, 0.05);
}

body.admin-studio-shell .flow-steps b {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #60a5fa, #7c6df8);
    color: #ffffff;
    font-size: 0.94rem;
}

body.admin-studio-shell .flow-steps span {
    color: #24304a;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.35;
}

body.admin-studio-shell .flow-board {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

body.admin-studio-shell .flow-section-map,
body.admin-studio-shell .flow-layout-status,
body.admin-studio-shell .flow-module-section {
    border: 1px solid #dbe6f3;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 42px rgba(38, 55, 86, 0.07);
}

body.admin-studio-shell .flow-section-map {
    position: sticky;
    top: 18px;
    padding: 16px;
}

body.admin-studio-shell .flow-panel-heading {
    padding-bottom: 12px;
    border-bottom: 1px solid #e6edf5;
}

body.admin-studio-shell .flow-panel-heading h3 {
    margin: 8px 0 2px;
    color: #1f2a44;
    font-size: 1.28rem;
    line-height: 1.16;
}

body.admin-studio-shell .flow-section-map nav {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

body.admin-studio-shell .flow-section-map a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #dfe8f4;
    border-radius: 16px;
    background: #ffffff;
    color: #24304a;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

body.admin-studio-shell .flow-section-map a:hover,
body.admin-studio-shell .flow-section-map a.is-active {
    transform: translateY(-1px);
    border-color: #ffbfd6;
    box-shadow: 0 12px 28px rgba(213, 75, 125, 0.1);
}

body.admin-studio-shell .flow-section-map a > i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff, #fff5fa);
    color: #3b82f6;
}

body.admin-studio-shell .flow-section-map a strong,
body.admin-studio-shell .flow-module-card h4 {
    color: #1f2a44;
    font-size: 0.94rem;
    line-height: 1.2;
}

body.admin-studio-shell .flow-section-map a small {
    display: -webkit-box;
    margin-top: 2px;
    overflow: hidden;
    color: #6a748a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.admin-studio-shell .flow-section-map a b {
    display: grid;
    min-width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 999px;
    background: #f7e5ef;
    color: #a53a62;
    font-size: 0.78rem;
}

body.admin-studio-shell .flow-workspace {
    display: grid;
    gap: 16px;
    min-width: 0;
}

body.admin-studio-shell .flow-layout-status,
body.admin-studio-shell .flow-module-section {
    padding: 18px;
}

body.admin-studio-shell .flow-column-summary,
body.admin-studio-shell .flow-module-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

body.admin-studio-shell .flow-column-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-studio-shell .flow-column-summary a {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #dfe8f4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    color: #24304a;
    text-decoration: none;
}

body.admin-studio-shell .flow-column-summary i {
    color: #3b82f6;
}

body.admin-studio-shell .flow-column-summary strong {
    font-size: 1rem;
    line-height: 1.2;
}

body.admin-studio-shell .flow-column-summary span {
    color: #6a748a;
    font-size: 0.8rem;
    font-weight: 800;
}

body.admin-studio-shell .flow-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.admin-studio-shell .flow-module-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 15px;
    border: 1px solid #dfe8f4;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.88)),
        #ffffff;
}

body.admin-studio-shell .flow-module-card header {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

body.admin-studio-shell .flow-module-card header > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #fb7185, #fb923c);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(244, 114, 182, 0.17);
}

body.admin-studio-shell .flow-module-card:nth-child(3n + 2) header > span {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    box-shadow: 0 12px 24px rgba(96, 165, 250, 0.17);
}

body.admin-studio-shell .flow-module-card:nth-child(3n) header > span {
    background: linear-gradient(135deg, #2dd4bf, #a78bfa);
    box-shadow: 0 12px 24px rgba(45, 212, 191, 0.15);
}

body.admin-studio-shell .flow-module-card h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

body.admin-studio-shell .flow-module-card p {
    display: -webkit-box;
    min-height: 38px;
    margin: 0;
    overflow: hidden;
    color: #69758b;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.admin-studio-shell .flow-module-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

body.admin-studio-shell .flow-module-stats span {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f2f7ff;
    color: #526078;
    font-size: 0.74rem;
    font-weight: 800;
}

body.admin-studio-shell .flow-module-stats strong {
    color: #1f2a44;
}

body.admin-studio-shell .flow-module-preview {
    display: grid;
    gap: 6px;
    min-height: 82px;
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed #d7e3f2;
    border-radius: 15px;
    background: #fbfdff;
    list-style: none;
}

body.admin-studio-shell .flow-module-preview li {
    position: relative;
    padding-left: 14px;
    color: #2b3650;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.35;
}

body.admin-studio-shell .flow-module-preview li::before {
    content: "";
    position: absolute;
    top: 0.55em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #f472b6;
}

body.admin-studio-shell .flow-module-empty {
    display: grid;
    min-height: 82px;
    place-items: center;
    padding: 10px;
    border: 1px dashed #d7e3f2;
    border-radius: 15px;
    background: #fbfdff;
    color: #7a8497;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

body.admin-studio-shell .flow-module-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 2px;
}

body.admin-studio-shell .flow-module-card footer .ghost-button,
body.admin-studio-shell .flow-module-card footer .admin-button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 12px;
    font-size: 0.8rem;
}

@media (max-width: 1160px) {
    body.admin-studio-shell .flow-module-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell .flow-board {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .flow-section-map {
        position: static;
    }

    body.admin-studio-shell .flow-section-map nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body.admin-studio-shell .flow-hero,
    body.admin-studio-shell .flow-steps,
    body.admin-studio-shell .flow-column-summary,
    body.admin-studio-shell .flow-module-grid,
    body.admin-studio-shell .flow-section-map nav {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .flow-hero-actions {
        justify-content: stretch;
    }

    body.admin-studio-shell .flow-hero-actions > a {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 640px) {
    body.admin-studio-shell .flow-hero,
    body.admin-studio-shell .flow-layout-status,
    body.admin-studio-shell .flow-module-section,
    body.admin-studio-shell .flow-section-map {
        border-radius: 18px;
        padding: 14px;
    }

    body.admin-studio-shell .flow-steps article {
        min-height: 56px;
    }

    body.admin-studio-shell .flow-module-card {
        padding: 13px;
    }
}

/* Admin surface redesign: turn every manager page into a compact workbench. */
body.admin-studio-shell {
    --surface-line: #dbe6f3;
    --surface-soft: #f5f8fc;
    --surface-card: rgba(255, 255, 255, 0.94);
    --surface-title: #1f2a44;
    --surface-muted: #667389;
    --surface-pink: #d94b7d;
    --surface-blue: #3867e8;
    --surface-mint: #2fbfa6;
}

body.admin-studio-shell .admin-main {
    gap: 14px !important;
    padding: 18px 20px !important;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.86), rgba(255, 246, 250, 0.72)),
        #eef4fa !important;
}

body.admin-studio-shell .admin-studio-topbar {
    width: min(100%, 1480px) !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 14px 18px !important;
    border: 1px solid var(--surface-line) !important;
    border-left: 7px solid #60a5fa !important;
    border-radius: 18px !important;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.92)),
        #ffffff !important;
    box-shadow: 0 12px 30px rgba(31, 42, 68, 0.06) !important;
}

body.admin-studio-shell .admin-studio-title span {
    display: inline-flex !important;
    margin: 0 0 2px !important;
    color: var(--surface-pink) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
}

body.admin-studio-shell .admin-studio-title h1 {
    margin: 0 !important;
    color: var(--surface-title) !important;
    font-size: clamp(1.25rem, 2vw, 1.72rem) !important;
    line-height: 1.05 !important;
}

body.admin-studio-shell .admin-studio-title p {
    max-width: 820px !important;
    margin: 4px 0 0 !important;
    color: var(--surface-muted) !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .admin-studio-actions {
    gap: 8px !important;
}

body.admin-studio-shell .admin-studio-actions .ghost-button {
    min-height: 38px !important;
    padding: 0 13px !important;
    border-radius: 12px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .admin-context-nav {
    width: min(100%, 1480px) !important;
    margin-inline: auto !important;
    padding: 8px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.74) !important;
}

body.admin-studio-shell .admin-context-nav > div {
    padding-inline: 6px !important;
}

body.admin-studio-shell .admin-context-nav a {
    border-radius: 10px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-hero-panel,
body.admin-studio-shell .content-list-panel,
body.admin-studio-shell .studio-editor-panel,
body.admin-studio-shell .studio-workspace-grid,
body.admin-studio-shell .studio-layout-map,
body.admin-studio-shell .studio-overview-grid,
body.admin-studio-shell .studio-theme-grid,
body.admin-studio-shell .studio-settings-grid {
    width: min(100%, 1480px) !important;
    margin-inline: auto !important;
}

body.admin-studio-shell .studio-hero-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 14px !important;
    align-items: center !important;
    padding: 16px 18px !important;
    border: 1px solid var(--surface-line) !important;
    border-left: 7px solid #a78bfa !important;
    border-radius: 20px !important;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 255, 0.94)),
        #ffffff !important;
    box-shadow: 0 16px 36px rgba(31, 42, 68, 0.06) !important;
}

body.admin-studio-shell .studio-hero-panel span {
    color: var(--surface-pink) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-hero-panel h2 {
    margin: 2px 0 3px !important;
    color: var(--surface-title) !important;
    font-size: clamp(1.28rem, 2vw, 1.8rem) !important;
    line-height: 1.08 !important;
}

body.admin-studio-shell .studio-hero-panel p {
    max-width: 860px !important;
    margin: 0 !important;
    color: var(--surface-muted) !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.42 !important;
}

body.admin-studio-shell .studio-workspace-grid-full {
    display: block !important;
}

body.admin-studio-shell .studio-editor-panel,
body.admin-studio-shell .content-list-panel {
    overflow: visible !important;
    padding: 18px !important;
    border: 1px solid var(--surface-line) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.9)),
        #ffffff !important;
    box-shadow: 0 18px 42px rgba(31, 42, 68, 0.07) !important;
}

body.admin-studio-shell .studio-panel-head,
body.admin-studio-shell .content-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #e7eef7 !important;
}

body.admin-studio-shell .studio-panel-head span,
body.admin-studio-shell .content-toolbar .panel-kicker {
    color: var(--surface-pink) !important;
    font-size: 0.7rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-panel-head h3,
body.admin-studio-shell .content-toolbar-copy p {
    margin: 0 !important;
    color: var(--surface-title) !important;
    font-size: clamp(1rem, 1.35vw, 1.24rem) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .content-toolbar-copy {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
}

body.admin-studio-shell .content-toolbar-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #4f8cff, #7c6df8) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-toolbar-actions,
body.admin-studio-shell .content-toolbelt {
    gap: 9px !important;
}

body.admin-studio-shell .content-count-chip,
body.admin-studio-shell .content-visible-count,
body.admin-studio-shell .content-sort-hint {
    min-height: 36px !important;
    border-radius: 999px !important;
    background: #f5f8fc !important;
    color: #566277 !important;
    font-size: 0.76rem !important;
}

body.admin-studio-shell .content-toolbar-actions .admin-button,
body.admin-studio-shell .studio-add-row .admin-button,
body.admin-studio-shell .studio-panel-head + .studio-column-toolbar .admin-button {
    min-height: 38px !important;
    padding: 0 15px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
}

body.admin-studio-shell .content-toolbelt {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, auto) auto auto !important;
    align-items: end !important;
    margin: 14px 0 !important;
    padding: 12px !important;
    border: 1px solid #e4edf7 !important;
    border-radius: 18px !important;
    background: #f7faff !important;
}

body.admin-studio-shell .content-search-box,
body.admin-studio-shell .content-filter-select,
body.admin-studio-shell .studio-add-row,
body.admin-studio-shell .studio-column-toolbar,
body.admin-studio-shell .studio-layout-dropdown summary {
    min-height: 40px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-search-box input,
body.admin-studio-shell .content-filter-select select {
    min-height: 38px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .content-list-panel .table-wrap {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-list-panel .admin-table {
    display: block !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-list-panel .admin-table thead {
    display: none !important;
}

body.admin-studio-shell .content-list-panel .admin-table tbody {
    display: grid !important;
    gap: 10px !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr {
    display: grid !important;
    grid-template-columns: minmax(70px, 0.38fr) repeat(auto-fit, minmax(150px, 1fr)) minmax(126px, auto) !important;
    gap: 12px !important;
    align-items: center !important;
    min-height: 92px !important;
    padding: 13px !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 18px !important;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.95)),
        #ffffff !important;
    box-shadow: 0 10px 26px rgba(31, 42, 68, 0.045) !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr:hover {
    border-color: #b9d6ff !important;
    transform: translateY(-1px);
}

body.admin-studio-shell .content-list-panel .admin-table td {
    display: grid !important;
    gap: 4px !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #1f2a44 !important;
    font-size: 0.86rem !important;
    font-weight: 900 !important;
    line-height: 1.28 !important;
}

body.admin-studio-shell .content-list-panel .admin-table td::before {
    content: attr(data-label);
    color: #7b8799;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-cell {
    grid-template-columns: 42px 1fr !important;
    align-items: center !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-cell::before {
    grid-column: 1 / -1;
}

body.admin-studio-shell .content-list-panel .drag-handle,
body.admin-studio-shell .studio-drag {
    width: 42px !important;
    height: 42px !important;
    border: 1px solid #dbe8fb !important;
    border-radius: 13px !important;
    background: #eff6ff !important;
    color: #3867e8 !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-order {
    color: #69758b !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .content-list-panel .admin-thumb {
    width: 58px !important;
    height: 44px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-list-panel .admin-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

body.admin-studio-shell .content-list-panel .pill,
body.admin-studio-shell .content-list-panel .parent-menu-label,
body.admin-studio-shell .content-list-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel .color-chip {
    width: max-content !important;
    max-width: 100% !important;
    min-height: 28px !important;
    padding: 4px 9px !important;
    border-radius: 10px !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-list-panel .table-actions-cell {
    justify-self: end !important;
    align-self: center !important;
}

body.admin-studio-shell .content-list-panel .table-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 7px !important;
}

body.admin-studio-shell .content-list-panel .icon-button {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .studio-column-toolbar {
    display: grid !important;
    grid-template-columns: minmax(260px, 0.9fr) minmax(240px, 0.7fr) !important;
    gap: 10px !important;
    height: auto !important;
    margin: 14px 0 !important;
    padding: 10px !important;
    background: #f7faff !important;
}

body.admin-studio-shell .studio-layout-dropdown summary {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 0 12px !important;
}

body.admin-studio-shell .studio-column-switcher {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 4px !important;
    border-radius: 13px !important;
    background: #eef4fb !important;
}

body.admin-studio-shell .studio-column-switcher a {
    min-height: 34px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-relation-strip {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    margin: 12px 0 !important;
    padding: 13px !important;
    border: 1px solid #dbe6f3 !important;
    border-left: 6px solid #2dd4bf !important;
    border-radius: 17px !important;
    background: #f8fffd !important;
}

body.admin-studio-shell .studio-relation-strip i {
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    background: #ecfeff !important;
    color: #2563eb !important;
}

body.admin-studio-shell .studio-relation-strip strong {
    color: #1f2a44 !important;
    font-size: 0.92rem !important;
}

body.admin-studio-shell .studio-relation-strip span {
    color: #657189 !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    line-height: 1.42 !important;
}

body.admin-studio-shell .studio-add-row {
    display: grid !important;
    grid-template-columns: minmax(220px, 1fr) auto !important;
    gap: 8px !important;
    margin: 12px 0 !important;
    padding: 10px !important;
    background: #f7faff !important;
}

body.admin-studio-shell .studio-add-row select,
body.admin-studio-shell .studio-add-row input {
    min-height: 38px !important;
    border-radius: 11px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .studio-block-list,
body.admin-studio-shell .studio-simple-list {
    display: grid !important;
    gap: 10px !important;
    margin-top: 12px !important;
}

body.admin-studio-shell .studio-block-row {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: start !important;
    padding: 13px !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 26px rgba(31, 42, 68, 0.045) !important;
}

body.admin-studio-shell .studio-block-form {
    display: grid !important;
    grid-template-columns: minmax(170px, 0.8fr) repeat(3, minmax(150px, 1fr)) auto auto !important;
    gap: 10px !important;
    align-items: end !important;
}

body.admin-studio-shell .studio-block-title {
    align-self: center !important;
}

body.admin-studio-shell .studio-block-title strong {
    color: #1f2a44 !important;
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .studio-block-title small {
    color: #7b8799 !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .studio-block-form label,
body.admin-studio-shell .studio-simple-row label {
    color: #6b778c !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-block-form input,
body.admin-studio-shell .studio-block-form select,
body.admin-studio-shell .studio-simple-row input,
body.admin-studio-shell .studio-simple-row select {
    min-height: 36px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-block-form button,
body.admin-studio-shell .studio-row-actions button,
body.admin-studio-shell .studio-simple-row button {
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 0.76rem !important;
}

body.admin-studio-shell .studio-row-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .studio-simple-row {
    display: grid !important;
    grid-template-columns: 44px repeat(auto-fit, minmax(135px, 1fr)) auto auto !important;
    gap: 9px !important;
    align-items: center !important;
    padding: 12px !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

@media (max-width: 1240px) {
    body.admin-studio-shell .content-toolbelt,
    body.admin-studio-shell .studio-column-toolbar,
    body.admin-studio-shell .studio-block-form,
    body.admin-studio-shell .studio-block-row,
    body.admin-studio-shell .studio-relation-strip {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-row-actions,
    body.admin-studio-shell .content-list-panel .table-actions-cell {
        justify-self: stretch !important;
    }

    body.admin-studio-shell .content-list-panel .table-actions {
        justify-content: flex-start !important;
    }
}

@media (max-width: 780px) {
    body.admin-studio-shell .admin-main {
        padding: 12px !important;
    }

    body.admin-studio-shell .admin-studio-topbar,
    body.admin-studio-shell .studio-hero-panel,
    body.admin-studio-shell .content-toolbar,
    body.admin-studio-shell .studio-panel-head {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-list-panel .admin-table tr {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-toolbar-copy {
        grid-template-columns: 42px minmax(0, 1fr) !important;
    }

    body.admin-studio-shell .content-toolbar-icon {
        width: 42px !important;
        height: 42px !important;
    }
}

/* Final scoped layout for the page content editor modal. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(1180px, calc(100vw - 40px)) !important;
    max-height: calc(100dvh - 28px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid #cfdbea !important;
    border-radius: 20px !important;
    background: #f6f9fd !important;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    min-height: 0 !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid #dde8f5 !important;
    background: #ffffff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 26px !important;
    padding: 4px 11px !important;
    color: #be3d69 !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    border: 1px solid #ffc5d8 !important;
    border-radius: 999px !important;
    background: #fff7fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin: 8px 0 0 !important;
    color: #17233c !important;
    font-size: clamp(1.48rem, 2.25vw, 2.05rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    flex: 0 0 auto !important;
    width: 48px !important;
    height: 48px !important;
    color: #17233c !important;
    border: 1px solid #d3e1f0 !important;
    border-radius: 15px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 22px rgba(23, 35, 60, 0.08) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-form,
.content-editor-modal .admin-modal-form {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #eef4fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    display: grid !important;
    align-content: start !important;
    gap: 14px !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d8e4f1 !important;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 26px rgba(23, 35, 60, 0.055) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n + 2),
.content-editor-modal .admin-form-section:nth-child(3n + 2) {
    border-left-color: #14b8a6 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n),
.content-editor-modal .admin-form-section:nth-child(3n) {
    border-left-color: #e05283 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #e5edf7 !important;
    background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    color: #ffffff !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #3b82f6, #6d5dfc) !important;
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.16) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong {
    color: #17233c !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small {
    margin-top: 2px !important;
    color: #66758c !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 16px 18px 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid .wide,
.content-editor-modal .admin-form-grid .wide {
    grid-column: 1 / -1 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field,
.content-editor-modal .admin-field {
    display: grid !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 0 !important;
    color: #40516c !important;
    font-size: 0.92rem !important;
    font-weight: 900 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .admin-field[hidden],
.content-editor-modal .admin-field[hidden],
body.admin-studio-shell .content-editor-modal [hidden],
.content-editor-modal [hidden] {
    display: none !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 44px !important;
    padding: 10px 12px !important;
    color: #17233c !important;
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
    border: 1px solid #cfdbea !important;
    border-radius: 12px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-editor,
.content-editor-modal .rich-text-editor {
    overflow: hidden !important;
    border: 1px solid #cfdbea !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px !important;
    border-bottom: 1px solid #dfe8f4 !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    width: auto !important;
    min-width: 42px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    border: 1px solid #cfdbea !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    color: #17233c !important;
    font-size: 0.9rem !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-toolbar select {
    min-width: 150px !important;
    padding-right: 32px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-color-picker {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker input,
.content-editor-modal .rich-text-color-picker input {
    width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 220px !important;
    padding: 18px 20px !important;
    color: #24304a;
    font-size: 1rem !important;
    font-weight: 650 !important;
    line-height: 1.75 !important;
    background: #ffffff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-editor,
.content-editor-modal .layout-column-editor {
    margin-top: 0 !important;
    padding: 14px !important;
    border-color: #cfdbea !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions,
.content-editor-modal .admin-modal-actions {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    min-height: 72px !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    border-top: 1px solid #dbe7f4 !important;
    background: #ffffff !important;
    box-shadow: 0 -10px 28px rgba(23, 35, 60, 0.06) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions .ghost-button,
body.admin-studio-shell .content-editor-modal .admin-modal-actions .admin-button,
.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 46px !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
}

@media (max-width: 820px) {
    body.admin-studio-shell .admin-modal-card.content-editor-modal,
    .admin-modal-card.content-editor-modal {
        width: calc(100vw - 18px) !important;
        max-height: calc(100dvh - 18px) !important;
        border-radius: 18px !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-form-grid,
    .content-editor-modal .admin-form-grid {
        grid-template-columns: 1fr !important;
        padding: 14px !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-modal-head,
    .content-editor-modal .admin-modal-head {
        padding: 14px !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
    .content-editor-modal .admin-modal-head h2 {
        font-size: 1.45rem !important;
    }
}

.popup-settings-page .popup-settings-brief {
    margin-bottom: 18px;
}

.popup-settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.popup-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.popup-settings-page .settings-sections {
    gap: 16px;
}

.popup-settings-page .settings-field-grid {
    gap: 16px;
}

.popup-settings-page .popup-settings-image-preview img {
    max-height: 240px;
    object-fit: cover;
}

.popup-settings-preview {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border: 1px solid #d8e4f1;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 48px rgba(24, 44, 76, 0.08);
}

.popup-settings-preview h3 {
    margin: 0;
    color: #1f2a46;
    font-size: 1.45rem;
}

.popup-preview-card {
    overflow: hidden;
    border: 1px solid #d8e4f1;
    border-radius: 20px;
    background: #fff;
}

.popup-preview-card img,
.popup-preview-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
}

.popup-preview-card img {
    display: block;
    object-fit: cover;
}

.popup-preview-placeholder {
    display: grid;
    place-items: center;
    gap: 8px;
    background: #eef5ff;
    color: #6b7890;
    font-weight: 800;
}

.popup-preview-placeholder svg {
    width: 42px;
    height: 42px;
}

.popup-preview-card > div:not(.popup-preview-placeholder) {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
}

.popup-preview-card b {
    color: #1f2a46;
    font-size: 1.15rem;
}

.popup-preview-card p,
.popup-settings-preview small {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
    font-weight: 700;
}

.popup-preview-button {
    display: inline-flex;
    align-self: flex-start;
    min-height: 40px;
    align-items: center;
    padding: 0 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f8cff, #7567ff);
    color: #fff;
    font-weight: 900;
}

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

    .popup-settings-preview {
        position: static;
    }
}

/* Restore the page content modal to the previous spacious editor style requested by the user. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(1280px, calc(100vw - 16px)) !important;
    max-height: calc(100dvh - 18px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid rgba(205, 219, 236, 0.95) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 30px 80px rgba(36, 48, 74, 0.26) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 18px !important;
    min-height: 116px !important;
    padding: 0 28px 24px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background:
        linear-gradient(135deg, rgba(255, 242, 248, 0.92), rgba(238, 253, 255, 0.92)),
        #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 30px !important;
    margin-top: -2px !important;
    padding: 4px 14px !important;
    color: #d94878 !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    border: 1px solid #ffc5d8 !important;
    border-radius: 999px !important;
    background: #fff8fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin: 10px 0 0 !important;
    color: #17233c !important;
    font-size: clamp(2.05rem, 3.6vw, 3.15rem) !important;
    line-height: 0.98 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 66px !important;
    height: 66px !important;
    margin-top: 32px !important;
    color: #17233c !important;
    border: 1px solid #cfe0f2 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-form,
.content-editor-modal .admin-modal-form {
    display: block !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 0 22px 96px !important;
    background: #f5f8fc !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    display: grid !important;
    gap: 18px !important;
    overflow: visible !important;
    padding: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section {
    display: grid !important;
    gap: 14px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 18px 0 0 !important;
    padding: 20px !important;
    overflow: visible !important;
    border: 1px solid #d8e4f1 !important;
    border-left: 2px solid #d8e4f1 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n + 2),
body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n),
.content-editor-modal .admin-form-section:nth-child(3n + 2),
.content-editor-modal .admin-form-section:nth-child(3n) {
    border-left-color: #d8e4f1 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 58px !important;
    height: 58px !important;
    padding: 15px !important;
    color: #fff !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #4f78ff, #805df7) !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong {
    color: #17233c !important;
    font-size: 1.3rem !important;
    line-height: 1.15 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small {
    color: #6b7890 !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid .wide,
.content-editor-modal .admin-form-grid .wide {
    grid-column: 1 / -1 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field,
.content-editor-modal .admin-field {
    display: grid !important;
    gap: 9px !important;
    min-height: 0 !important;
    padding: 0 !important;
    color: #3b465f !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 60px !important;
    padding: 12px 18px !important;
    color: #17233c !important;
    font-size: 1.16rem !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    border: 1px solid #cfdff1 !important;
    border-radius: 18px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-editor,
.content-editor-modal .rich-text-editor {
    overflow: hidden !important;
    border: 1px solid #cfdff1 !important;
    border-radius: 18px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 18px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background: #fff8fc !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    width: auto !important;
    min-width: 58px !important;
    min-height: 58px !important;
    padding: 0 14px !important;
    color: #17233c !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
    border: 1px solid #cfdff1 !important;
    border-radius: 14px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-toolbar select {
    min-width: 170px !important;
    padding-right: 34px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-color-picker {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker input,
.content-editor-modal .rich-text-color-picker input {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 360px !important;
    padding: 34px !important;
    color: #24304a;
    font-size: 1.42rem !important;
    font-weight: 800 !important;
    line-height: 1.68 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .field-hint,
.content-editor-modal .field-hint {
    color: #7a879b !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions,
.content-editor-modal .admin-modal-actions {
    position: sticky !important;
    bottom: -96px !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    min-height: 86px !important;
    margin: 22px -22px -96px !important;
    padding: 18px 22px !important;
    border-top: 1px solid #dce8f6 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 -12px 28px rgba(36, 48, 74, 0.08) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions .ghost-button,
body.admin-studio-shell .content-editor-modal .admin-modal-actions .admin-button,
.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 58px !important;
    padding: 0 24px !important;
    border-radius: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 900 !important;
}

@media (max-width: 820px) {
    body.admin-studio-shell .content-editor-modal .admin-form-grid,
    .content-editor-modal .admin-form-grid {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-editor-modal .rich-text-surface,
    .content-editor-modal .rich-text-surface {
        min-height: 240px !important;
        padding: 18px !important;
        font-size: 1rem !important;
    }
}

.layout-column-editor {
    display: grid;
    gap: 16px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d8e7fb;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
}

[data-standard-content-field][hidden] {
    display: none;
}

.layout-column-editor[hidden] {
    display: none;
}

.layout-column-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4edf8;
}

.layout-column-editor-head strong {
    display: block;
    color: #1f2a44;
    font-size: 1rem;
}

.layout-column-editor-head small {
    display: block;
    margin-top: 4px;
    color: #65728a;
    font-weight: 700;
}

.layout-column-editor-head > span {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: #2563eb;
    font-weight: 900;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
}

.layout-column-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.layout-column-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d8e7fb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(40, 60, 100, 0.06);
}

.layout-column-card[hidden] {
    display: none;
}

.layout-column-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.layout-column-card header span {
    color: #2563eb;
    font-weight: 900;
}

.layout-column-card header select {
    width: auto;
    min-width: 126px;
    min-height: 40px;
    padding: 8px 34px 8px 12px;
}

.layout-column-card label {
    display: grid;
    gap: 7px;
}

.layout-column-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 136px);
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e4edf8;
    border-radius: 14px;
    background: #f8fbff;
}

.layout-column-check,
.layout-column-align {
    display: grid;
    gap: 6px;
}

.layout-column-check {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 40px;
    color: #34435f;
    font-weight: 900;
}

.layout-column-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.layout-column-check span {
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.35;
}

.layout-column-align > span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
}

.layout-column-align select {
    min-height: 38px;
    padding: 7px 32px 7px 10px;
}

.layout-column-card label > span {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 900;
}

.layout-column-card input[type="text"],
.layout-column-card textarea {
    width: 100%;
}

.layout-column-mode {
    display: grid;
    gap: 12px;
}

.layout-column-mode[hidden] {
    display: none;
}

.layout-column-image-preview {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e1ebf8;
    border-radius: 14px;
    background: #f8fbff;
}

.layout-column-image-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
}

.layout-column-image-preview span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .layout-column-grid {
        grid-template-columns: 1fr;
    }

    .layout-column-controls {
        grid-template-columns: 1fr;
    }
}

.admin-modal-card.content-editor-modal {
    width: min(1280px, calc(100vw - 48px));
    max-height: calc(100vh - 28px);
    border: 1px solid rgba(193, 212, 235, 0.96);
    border-radius: 24px;
    background: #f8fbff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.content-editor-modal .admin-modal-head {
    align-items: center;
    min-height: auto;
    padding: 22px 28px;
    border-bottom: 1px solid #dbe7f5;
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(246, 250, 255, 0.98)),
        #fff;
}

.content-editor-modal .admin-modal-head .panel-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    color: #c2376c;
    font-size: 0.88rem;
    font-weight: 900;
    border: 1px solid #ffc9dc;
    border-radius: 999px;
    background: #fff8fb;
}

.content-editor-modal .admin-modal-head h2 {
    margin-top: 8px;
    color: #1f2a44;
    font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.content-editor-modal .admin-modal-head .icon-button {
    width: 58px;
    height: 58px;
    color: #1f2a44;
    border-color: #d4e3f5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.08);
}

.content-editor-modal .admin-modal-form {
    padding: 22px 24px 104px;
    background: #f8fbff;
}

.content-editor-modal .admin-form-sections {
    gap: 18px;
}

.content-editor-modal .admin-form-section {
    overflow: hidden;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(31, 42, 68, 0.06);
}

.content-editor-modal .admin-form-section-head {
    padding: 18px 20px;
    border-bottom: 1px solid #e4edf8;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head > i {
    width: 52px;
    height: 52px;
    padding: 13px;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f8df7, #7b61ff);
    box-shadow: 0 12px 24px rgba(79, 141, 247, 0.18);
}

.content-editor-modal .admin-form-section-head strong {
    color: #1f2a44;
    font-size: 1.1rem;
    line-height: 1.25;
}

.content-editor-modal .admin-form-section-head small {
    margin-top: 3px;
    color: #66758d;
    font-weight: 800;
    line-height: 1.45;
}

.content-editor-modal .admin-form-grid {
    padding: 20px;
}

.content-editor-modal .admin-field > label,
.content-editor-modal .admin-field > div > label {
    color: #40516c;
    font-weight: 900;
}

.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    border-color: #d4e3f5;
    background: #fbfdff;
}

.content-editor-modal input:focus,
.content-editor-modal textarea:focus,
.content-editor-modal select:focus {
    border-color: #86b7ff;
    box-shadow: 0 0 0 4px rgba(79, 141, 247, 0.12);
}

.content-editor-modal .rich-text-editor {
    overflow: hidden;
    border: 1px solid #d4e3f5;
    border-radius: 18px;
    background: #fff;
}

.content-editor-modal .rich-text-toolbar {
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #dbe7f5;
    background: #f7faff;
}

.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    min-height: 42px;
    border: 1px solid #d4e3f5;
    border-radius: 12px;
    background: #fff;
}

.content-editor-modal .rich-text-color-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: #40516c;
    font-weight: 900;
    cursor: pointer;
}

.content-editor-modal .rich-text-color-picker input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.content-editor-modal .rich-text-surface {
    min-height: 260px;
    padding: 22px 26px;
    color: #24304a;
    font-size: 1rem;
    line-height: 1.8;
    background: #fff;
}

.content-editor-modal .layout-column-editor {
    margin-top: 0;
    border-color: #cfe0ff;
    background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.content-editor-modal .admin-modal-actions {
    padding: 16px 24px;
    border-top: 1px solid #dbe7f5;
    background: rgba(248, 251, 255, 0.94);
    backdrop-filter: blur(12px);
}

.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 900;
}

@media (max-width: 780px) {
    .admin-modal-card.content-editor-modal {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        border-radius: 20px;
    }

    .content-editor-modal .admin-modal-head,
    .content-editor-modal .admin-modal-form,
    .content-editor-modal .admin-modal-actions {
        padding-left: 14px;
        padding-right: 14px;
    }

    .content-editor-modal .admin-form-grid {
        padding: 14px;
    }

    .content-editor-modal .rich-text-surface {
        min-height: 210px;
        padding: 16px;
    }
}

/* Admin workbench v2: split controls from work items so every manager page stops feeling like a table. */
body.admin-studio-shell {
    --bench-bg: #edf4fb;
    --bench-ink: #17233b;
    --bench-muted: #64728a;
    --bench-line: #d9e5f2;
    --bench-card: #ffffff;
    --bench-blue: #3b6ff0;
    --bench-cyan: #38bdf8;
    --bench-green: #2ec4a6;
    --bench-pink: #dc4f83;
    --bench-peach: #fb8b73;
}

body.admin-studio-shell .admin-main {
    gap: 12px !important;
    padding: 16px 18px !important;
    background:
        radial-gradient(circle at 18% 10%, rgba(96, 165, 250, 0.16), transparent 34%),
        radial-gradient(circle at 92% 6%, rgba(244, 114, 182, 0.12), transparent 30%),
        linear-gradient(180deg, #eef5fc 0%, #f9fbff 100%) !important;
}

body.admin-studio-shell .admin-studio-topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    min-height: 0 !important;
    padding: 13px 16px !important;
    border-radius: 18px !important;
    border: 1px solid var(--bench-line) !important;
    border-left: 6px solid var(--bench-blue) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 16px 36px rgba(23, 35, 59, 0.07) !important;
}

body.admin-studio-shell .admin-studio-title h1 {
    font-size: clamp(1.2rem, 1.65vw, 1.62rem) !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .admin-studio-title p {
    max-width: 760px !important;
    font-size: 0.74rem !important;
    line-height: 1.32 !important;
}

body.admin-studio-shell .admin-studio-actions .ghost-button,
body.admin-studio-shell .admin-studio-actions .admin-button {
    min-height: 36px !important;
    padding: 0 12px !important;
    border-radius: 11px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .content-list-panel,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) {
    display: grid !important;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start !important;
    padding: 14px !important;
    border: 1px solid var(--bench-line) !important;
    border-radius: 22px !important;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(246, 250, 255, 0.92)),
        var(--bench-card) !important;
    box-shadow: 0 18px 44px rgba(23, 35, 59, 0.07) !important;
}

body.admin-studio-shell .content-list-panel {
    grid-template-areas:
        "summary list"
        "tools list"
        "notice list" !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) {
    grid-template-areas:
        "summary list"
        "tools list"
        "info list"
        "add list" !important;
}

body.admin-studio-shell .content-toolbar,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head {
    grid-area: summary !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-self: stretch !important;
    position: sticky !important;
    top: 14px !important;
    min-height: 0 !important;
    padding: 14px !important;
    border: 1px solid #dce8f6 !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, #ffffff, #f7fbff),
        #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82) !important;
}

body.admin-studio-shell .content-toolbar::before,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head::before {
    content: "พื้นที่ทำงาน";
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--bench-blue);
    font-size: 0.62rem;
    font-weight: 900;
}

body.admin-studio-shell .content-toolbar-copy {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
}

body.admin-studio-shell .content-toolbar-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, var(--bench-blue), #7c6df8) !important;
}

body.admin-studio-shell .content-toolbar .panel-kicker,
body.admin-studio-shell .studio-panel-head span {
    font-size: 0.64rem !important;
    color: var(--bench-pink) !important;
}

body.admin-studio-shell .content-toolbar-copy p,
body.admin-studio-shell .studio-panel-head h3 {
    font-size: 1rem !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .content-toolbar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-toolbar-actions .admin-button,
body.admin-studio-shell .content-count-chip {
    width: 100% !important;
    justify-content: center !important;
}

body.admin-studio-shell .content-toolbelt {
    grid-area: tools !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    position: sticky !important;
    top: 214px !important;
    margin: 0 !important;
    padding: 12px !important;
    border: 1px solid #dce8f6 !important;
    border-radius: 18px !important;
    background: #f6f9fd !important;
}

body.admin-studio-shell .content-search-box,
body.admin-studio-shell .content-filter-select,
body.admin-studio-shell .content-visible-count,
body.admin-studio-shell .content-sort-hint {
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 12px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .content-list-panel > .admin-alert {
    grid-area: notice !important;
    margin: 0 !important;
}

body.admin-studio-shell .content-list-panel .table-wrap {
    grid-area: list !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.admin-studio-shell .content-list-panel .admin-table,
body.admin-studio-shell .content-list-panel .admin-table tbody {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.admin-studio-shell .content-list-panel .admin-table tbody {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)) !important;
    gap: 12px !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 10px 14px !important;
    align-items: start !important;
    min-height: 0 !important;
    padding: 15px 15px 14px 18px !important;
    border: 1px solid #dce7f4 !important;
    border-left: 5px solid var(--bench-cyan) !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%),
        #ffffff !important;
    box-shadow: 0 12px 28px rgba(23, 35, 59, 0.055) !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr:nth-child(3n + 2) {
    border-left-color: var(--bench-green) !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr:nth-child(3n) {
    border-left-color: var(--bench-pink) !important;
}

body.admin-studio-shell .content-list-panel .admin-table td {
    display: grid !important;
    gap: 3px !important;
    grid-column: 2 !important;
    min-width: 0 !important;
    color: var(--bench-ink) !important;
    font-size: 0.78rem !important;
    line-height: 1.24 !important;
}

body.admin-studio-shell .content-list-panel .admin-table td::before {
    color: #7b8aa0 !important;
    font-size: 0.6rem !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-cell {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-bottom: 9px !important;
    border-bottom: 1px dashed #dce8f6 !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-cell::before {
    content: "ลำดับ";
    width: auto;
}

body.admin-studio-shell .content-list-panel .admin-table td[data-label="รูป"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="ไอคอน"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="ประเภท"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="ลำดับ"] + td {
    grid-column: 1 !important;
    grid-row: span 4 !important;
    align-self: start !important;
}

body.admin-studio-shell .content-list-panel .admin-table td[data-label^="ชื่อ"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label*="หัวข้อ"] {
    grid-column: 2 !important;
    font-size: 0.9rem !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .content-list-panel .admin-table td[data-label="Slug"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="ลิงก์"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="อยู่ใต้เมนูหลัก"],
body.admin-studio-shell .content-list-panel .admin-table td[data-label="หมวด"] {
    display: inline-grid !important;
    justify-self: start !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-order {
    min-width: 24px;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .content-list-panel .admin-thumb {
    width: 80px !important;
    height: 58px !important;
    border: 1px solid #dbe7f4 !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .content-list-panel .pill,
body.admin-studio-shell .content-list-panel .parent-menu-label,
body.admin-studio-shell .content-list-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel .color-chip {
    min-height: 26px !important;
    padding: 4px 8px !important;
    border-radius: 9px !important;
    font-size: 0.68rem !important;
}

body.admin-studio-shell .content-list-panel .table-actions-cell {
    grid-column: 1 / -1 !important;
    justify-self: stretch !important;
    padding-top: 10px !important;
    border-top: 1px solid #eef3f9 !important;
}

body.admin-studio-shell .content-list-panel .table-actions-cell::before {
    display: none !important;
}

body.admin-studio-shell .content-list-panel .table-actions {
    justify-content: flex-start !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-list-panel .icon-button {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar {
    grid-area: tools !important;
    position: sticky !important;
    top: 214px !important;
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip {
    grid-area: info !important;
    position: sticky !important;
    top: 346px !important;
    grid-template-columns: 38px minmax(0, 1fr) !important;
    margin: 0 !important;
    padding: 12px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip .ghost-button {
    grid-column: 1 / -1;
    justify-content: center;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-add-row {
    grid-area: add !important;
    position: sticky !important;
    top: 468px !important;
    grid-template-columns: 1fr !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-list {
    grid-area: list !important;
    margin: 0 !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: start !important;
    padding: 14px !important;
    border-left: 5px solid var(--bench-green) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row:nth-child(3n + 2) {
    border-left-color: var(--bench-blue) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row:nth-child(3n) {
    border-left-color: var(--bench-pink) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form {
    grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(130px, 0.9fr)) minmax(125px, 0.7fr) auto !important;
    align-items: end !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions {
    grid-column: 2 / -1 !important;
    justify-content: flex-start !important;
    padding-top: 10px !important;
    border-top: 1px solid #eef3f9 !important;
}

body.admin-studio-shell .studio-drag,
body.admin-studio-shell .content-list-panel .drag-handle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .admin-modal {
    padding: 16px !important;
}

body.admin-studio-shell .admin-modal-backdrop,
body.admin-studio-shell .image-crop-backdrop {
    background:
        radial-gradient(circle at 22% 12%, rgba(59, 111, 240, 0.22), transparent 34%),
        rgba(15, 23, 42, 0.48) !important;
}

body.admin-studio-shell .admin-modal-card {
    width: min(900px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - 32px) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(219, 230, 243, 0.95) !important;
    background: #ffffff !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24) !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 0 !important;
    padding: 16px 18px !important;
    border-bottom: 1px solid #e5edf7 !important;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255, 241, 247, 0.96)),
        #ffffff !important;
}

body.admin-studio-shell .admin-modal-head .panel-kicker {
    color: var(--bench-pink) !important;
    font-size: 0.7rem !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    margin-top: 2px !important;
    font-size: clamp(1.22rem, 2vw, 1.55rem) !important;
    line-height: 1.12 !important;
}

body.admin-studio-shell .admin-modal-head .icon-button {
    width: 40px !important;
    height: 40px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .admin-modal-form {
    max-height: calc(100dvh - 154px) !important;
    padding: 16px 18px 92px !important;
    background: #f7faff !important;
}

body.admin-studio-shell .admin-form-sections {
    display: grid !important;
    gap: 12px !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 14px !important;
    border: 1px solid #dbe7f4 !important;
    border-left: 5px solid var(--bench-blue) !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 26px rgba(23, 35, 59, 0.045) !important;
}

body.admin-studio-shell .admin-form-section:nth-child(3n + 2) {
    border-left-color: var(--bench-green) !important;
}

body.admin-studio-shell .admin-form-section:nth-child(3n) {
    border-left-color: var(--bench-pink) !important;
}

body.admin-studio-shell .admin-form-section-head {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    margin-bottom: 12px !important;
}

body.admin-studio-shell .admin-form-section-head i {
    width: 38px !important;
    height: 38px !important;
    padding: 9px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .admin-form-section-head strong {
    font-size: 0.9rem !important;
}

body.admin-studio-shell .admin-form-section-head small {
    font-size: 0.7rem !important;
}

body.admin-studio-shell .admin-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 11px !important;
}

body.admin-studio-shell .admin-field {
    gap: 5px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .admin-field input,
body.admin-studio-shell .admin-field select,
body.admin-studio-shell .admin-field textarea {
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    font-size: 0.78rem !important;
}

body.admin-studio-shell .admin-field textarea {
    min-height: 100px !important;
}

body.admin-studio-shell .admin-modal-actions {
    min-height: 68px !important;
    padding: 12px 18px !important;
    border-top: 1px solid #e5edf7 !important;
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(10px) !important;
}

body.admin-studio-shell .admin-modal-actions .ghost-button,
body.admin-studio-shell .admin-modal-actions .admin-button {
    min-height: 40px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "summary"
            "tools"
            "info"
            "add"
            "notice"
            "list" !important;
    }

    body.admin-studio-shell .content-toolbar,
    body.admin-studio-shell .content-toolbelt,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-add-row {
        position: static !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-main {
        padding: 10px !important;
    }

    body.admin-studio-shell .admin-studio-topbar,
    body.admin-studio-shell .content-list-panel,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) {
        border-radius: 18px !important;
    }

    body.admin-studio-shell .content-list-panel .admin-table tbody {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form,
    body.admin-studio-shell .content-list-panel .admin-table tr {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions {
        grid-column: 1 / -1 !important;
    }

    body.admin-studio-shell .admin-modal {
        padding: 10px !important;
    }

    body.admin-studio-shell .admin-modal-head,
    body.admin-studio-shell .admin-modal-form,
    body.admin-studio-shell .admin-modal-actions {
        padding-inline: 12px !important;
    }
}

/* Admin formal table system: final reset from card lists to compact management tables. */
body.admin-studio-shell {
    --formal-bg: #eef4fb;
    --formal-panel: #ffffff;
    --formal-line: #dbe6f3;
    --formal-head: #f4f8fc;
    --formal-ink: #19263d;
    --formal-muted: #68768c;
    --formal-blue: #3468e8;
    --formal-pink: #d84d7d;
    --formal-green: #1f9d7a;
}

body.admin-studio-shell .admin-main {
    gap: 12px !important;
    padding: 14px 16px !important;
    background: linear-gradient(180deg, #edf4fb, #f9fbff) !important;
}

body.admin-studio-shell .admin-studio-topbar {
    min-height: 0 !important;
    padding: 12px 16px !important;
    border-radius: 16px !important;
    border: 1px solid var(--formal-line) !important;
    border-left: 5px solid var(--formal-blue) !important;
    box-shadow: 0 10px 24px rgba(25, 38, 61, 0.055) !important;
}

body.admin-studio-shell .admin-studio-title h1 {
    font-size: clamp(1.16rem, 1.45vw, 1.5rem) !important;
    line-height: 1.05 !important;
}

body.admin-studio-shell .admin-studio-title p {
    margin-top: 3px !important;
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
}

body.admin-studio-shell .content-list-panel,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) {
    display: block !important;
    width: min(100%, 1480px) !important;
    padding: 14px !important;
    border-radius: 18px !important;
    border: 1px solid var(--formal-line) !important;
    background: var(--formal-panel) !important;
    box-shadow: 0 14px 32px rgba(25, 38, 61, 0.06) !important;
}

body.admin-studio-shell .content-toolbar,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    position: static !important;
    min-height: 0 !important;
    padding: 0 0 12px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--formal-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-toolbar::before,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head::before {
    display: none !important;
}

body.admin-studio-shell .content-toolbar-copy {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 10px !important;
}

body.admin-studio-shell .content-toolbar-icon,
body.admin-studio-shell .studio-panel-head > div::before {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-toolbar .panel-kicker,
body.admin-studio-shell .studio-panel-head span {
    color: var(--formal-pink) !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-toolbar-copy p,
body.admin-studio-shell .studio-panel-head h3 {
    color: var(--formal-ink) !important;
    font-size: 1rem !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .content-toolbar-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-toolbar-actions .admin-button,
body.admin-studio-shell .content-count-chip,
body.admin-studio-shell .content-visible-count,
body.admin-studio-shell .content-sort-hint {
    width: auto !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 11px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .content-toolbelt,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar {
    display: grid !important;
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto auto !important;
    gap: 8px !important;
    align-items: end !important;
    position: static !important;
    margin: 12px 0 !important;
    padding: 10px !important;
    border: 1px solid var(--formal-line) !important;
    border-radius: 14px !important;
    background: var(--formal-head) !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-search-box,
body.admin-studio-shell .content-filter-select,
body.admin-studio-shell .studio-layout-dropdown summary,
body.admin-studio-shell .studio-column-switcher {
    min-height: 34px !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-search-box input,
body.admin-studio-shell .content-filter-select select {
    min-height: 32px !important;
    font-size: 0.76rem !important;
}

body.admin-studio-shell .content-list-panel .table-wrap {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    border: 1px solid var(--formal-line) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .content-list-panel .admin-table {
    display: table !important;
    width: 100% !important;
    min-width: 860px !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
}

body.admin-studio-shell .content-list-panel .admin-table thead {
    display: table-header-group !important;
}

body.admin-studio-shell .content-list-panel .admin-table tbody {
    display: table-row-group !important;
    width: auto !important;
    max-width: none !important;
}

body.admin-studio-shell .content-list-panel .admin-table tr {
    display: table-row !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}

body.admin-studio-shell .content-list-panel .admin-table th,
body.admin-studio-shell .content-list-panel .admin-table td {
    display: table-cell !important;
    grid-column: auto !important;
    grid-row: auto !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #e5edf6 !important;
    vertical-align: middle !important;
    color: var(--formal-ink) !important;
    font-size: 0.76rem !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
}

body.admin-studio-shell .content-list-panel .admin-table th {
    position: sticky !important;
    top: 0 !important;
    z-index: 1 !important;
    background: #f5f8fc !important;
    color: #66758c !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    text-align: left !important;
}

body.admin-studio-shell .content-list-panel .admin-table td::before {
    display: none !important;
}

body.admin-studio-shell .content-list-panel .admin-table tbody tr:nth-child(even) td {
    background: #fbfdff !important;
}

body.admin-studio-shell .content-list-panel .admin-table tbody tr:hover td {
    background: #f2f7ff !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-cell {
    display: table-cell !important;
    width: 76px !important;
    padding: 8px 9px !important;
    border-bottom: 1px solid #e5edf6 !important;
}

body.admin-studio-shell .content-list-panel .drag-handle,
body.admin-studio-shell .studio-drag {
    width: 30px !important;
    height: 30px !important;
    border-radius: 9px !important;
}

body.admin-studio-shell .content-list-panel .admin-table .drag-order {
    display: inline-block !important;
    margin-left: 6px !important;
    color: var(--formal-muted) !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .content-list-panel .admin-thumb {
    width: 54px !important;
    height: 40px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .content-list-panel .pill,
body.admin-studio-shell .content-list-panel .parent-menu-label,
body.admin-studio-shell .content-list-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel .color-chip {
    min-height: 24px !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    font-size: 0.66rem !important;
}

body.admin-studio-shell .content-list-panel .table-actions-cell {
    display: table-cell !important;
    width: 130px !important;
    padding: 8px 10px !important;
    border-top: 0 !important;
}

body.admin-studio-shell .content-list-panel .table-actions-cell::before {
    display: none !important;
}

body.admin-studio-shell .content-list-panel .table-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
}

body.admin-studio-shell .content-list-panel .icon-button {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
}

/* Service pages table: keep headers and cells aligned in a real table layout. */
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th,
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td,
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td[data-label] {
    display: table-cell !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(1),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(1) {
    width: 5.5% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(2),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(2) {
    width: 8% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(3),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(3) {
    width: 28.5% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(4),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(4) {
    width: 20% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(5),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(5) {
    width: 17% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(6),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(6) {
    width: 6% !important;
    text-align: center !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table th:nth-child(7),
body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td:nth-child(7) {
    width: 15% !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-table td[data-label="รูป"] {
    text-align: center !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .admin-thumb {
    width: min(62px, 100%) !important;
    height: 46px !important;
    margin-inline: auto !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages td[data-label="ชื่อหน้า"] {
    color: #17233c !important;
    font-size: 0.82rem !important;
    font-weight: 950 !important;
    line-height: 1.22 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages td[data-label="Slug"] {
    overflow-wrap: anywhere !important;
    color: #1f2a44 !important;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages td[data-label="หมวด"] {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages td[data-label="แสดง"] .pill {
    margin-inline: auto !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .table-actions {
    max-width: 100% !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 5px !important;
}

body.admin-studio-shell .content-list-panel.is-entity-service-pages .table-actions .icon-button {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 10px !important;
    position: static !important;
    margin: 0 0 12px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    border: 1px solid var(--formal-line) !important;
    border-left: 4px solid var(--formal-green) !important;
    background: #f8fffd !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip i {
    width: 32px !important;
    height: 32px !important;
    padding: 8px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip strong {
    font-size: 0.82rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip span {
    font-size: 0.72rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-add-row {
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) auto !important;
    gap: 8px !important;
    position: static !important;
    margin: 0 0 12px !important;
    padding: 10px !important;
    border: 1px solid var(--formal-line) !important;
    border-radius: 14px !important;
    background: var(--formal-head) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-list {
    display: block !important;
    margin: 0 !important;
    overflow-x: auto !important;
    border: 1px solid var(--formal-line) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-block-table-head,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row {
    display: grid !important;
    grid-template-columns: 52px minmax(160px, 1.15fr) minmax(150px, 0.95fr) minmax(180px, 1.15fr) minmax(128px, 0.8fr) 84px 134px !important;
    align-items: center !important;
    min-width: 980px !important;
}

body.admin-studio-shell .studio-block-table-head {
    padding: 9px 10px !important;
    background: #f5f8fc !important;
    color: #66758c !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    border-bottom: 1px solid var(--formal-line) !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row {
    gap: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #e5edf6 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row:nth-child(even) {
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row:hover {
    background: #f2f7ff !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-drag {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    margin: 8px 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form {
    display: contents !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-title,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form > button,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions {
    padding: 8px 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-title {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(1) {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(2) {
    grid-column: 4 !important;
    grid-row: 1 / span 2 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(3) {
    grid-column: 5 !important;
    grid-row: 1 / span 2 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(4) {
    grid-column: 6 !important;
    grid-row: 1 / span 2 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form > button {
    grid-column: 7 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-title strong {
    font-size: 0.78rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-title small {
    font-size: 0.66rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label {
    font-size: 0.62rem !important;
    color: #738096 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form input,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form select {
    min-height: 32px !important;
    padding: 5px 9px !important;
    border-radius: 9px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-check {
    justify-content: center !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form > button,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions button {
    min-height: 32px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 0.7rem !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions {
    grid-column: 7 !important;
    grid-row: 2 !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    border-top: 0 !important;
}

body.admin-studio-shell .admin-modal-card {
    width: min(880px, calc(100vw - 28px)) !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 0 !important;
    padding: 13px 16px !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    font-size: clamp(1.12rem, 1.65vw, 1.42rem) !important;
}

body.admin-studio-shell .admin-modal-form {
    max-height: calc(100dvh - 140px) !important;
    padding: 14px 16px 82px !important;
    overflow-x: hidden !important;
}

body.admin-studio-shell .admin-modal-form *,
body.admin-studio-shell .admin-form-section,
body.admin-studio-shell .admin-form-grid {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 12px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .admin-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
    gap: 9px !important;
}

body.admin-studio-shell .admin-field input,
body.admin-studio-shell .admin-field select,
body.admin-studio-shell .admin-field textarea {
    min-height: 34px !important;
    border-radius: 10px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .admin-modal-actions {
    min-height: 62px !important;
    padding: 10px 16px !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-toolbelt,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-studio-topbar,
    body.admin-studio-shell .content-toolbar,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-panel-head,
    body.admin-studio-shell .content-toolbelt,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-column-toolbar,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-relation-strip,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-add-row {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-list-panel .table-wrap,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-list {
        max-width: 100% !important;
        overflow-x: auto !important;
    }
}

/* Studio cleanup: remove duplicate section hero, simplify column tables, and make top menu a real table. */
body.admin-studio-shell .studio-block-table-head,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row {
    grid-template-columns: 54px minmax(170px, 1fr) minmax(190px, 1.05fr) minmax(230px, 1.2fr) minmax(145px, 0.78fr) 98px 220px !important;
    min-width: 1180px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-drag {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(1) {
    grid-column: 3 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(2) {
    grid-column: 4 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(3) {
    grid-column: 5 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label:nth-of-type(4) {
    grid-column: 6 !important;
    grid-row: 1 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form > button {
    display: none !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions {
    grid-column: 7 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 8px 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions form {
    margin: 0 !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-row-actions button {
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-row {
    min-height: 54px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form label {
    gap: 3px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form input,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list) .studio-block-form select {
    min-height: 30px !important;
}

body.admin-studio-shell .studio-top-menu-table {
    display: block !important;
    overflow-x: auto !important;
    border: 1px solid var(--formal-line) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-top-menu-head,
body.admin-studio-shell .studio-top-menu-row {
    display: grid !important;
    grid-template-columns: 54px minmax(150px, 0.9fr) minmax(145px, 0.8fr) minmax(130px, 0.7fr) minmax(210px, 1.15fr) minmax(180px, 1fr) minmax(150px, 0.85fr) 82px 86px 210px !important;
    align-items: center !important;
    min-width: 1480px !important;
}

body.admin-studio-shell .studio-top-menu-head {
    padding: 9px 10px !important;
    background: #f5f8fc !important;
    color: #66758c !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    border-bottom: 1px solid var(--formal-line) !important;
}

body.admin-studio-shell .studio-top-menu-row {
    gap: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e5edf6 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .studio-top-menu-row:nth-child(even) {
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-top-menu-row:hover {
    background: #f2f7ff !important;
}

body.admin-studio-shell .studio-top-menu-row > .studio-drag,
body.admin-studio-shell .studio-top-menu-row > input,
body.admin-studio-shell .studio-top-menu-row > select,
body.admin-studio-shell .studio-top-menu-row > label,
body.admin-studio-shell .studio-top-menu-row > .studio-simple-actions {
    margin: 0 !important;
    padding: 8px 10px !important;
}

body.admin-studio-shell .studio-top-menu-row > input,
body.admin-studio-shell .studio-top-menu-row > select {
    width: 100% !important;
    min-height: 32px !important;
    border-radius: 9px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .studio-top-menu-row > input[type="color"] {
    width: 58px !important;
    min-width: 58px !important;
    height: 32px !important;
    padding: 3px !important;
}

body.admin-studio-shell .studio-top-menu-row .studio-check {
    justify-content: flex-start !important;
    font-size: 0.74rem !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-simple-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
}

body.admin-studio-shell .studio-simple-actions button {
    min-height: 32px !important;
    padding: 0 10px !important;
    border-radius: 9px !important;
    font-size: 0.72rem !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-simple-actions a {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    color: #1d4ed8 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 9px !important;
    background: #eff6ff !important;
}

body.admin-studio-shell .studio-top-menu-add {
    display: grid !important;
    grid-template-columns: minmax(150px, 0.95fr) minmax(150px, 0.8fr) minmax(130px, 0.75fr) minmax(190px, 1fr) minmax(180px, 0.95fr) minmax(170px, 0.95fr) minmax(150px, 0.8fr) 82px auto !important;
    align-items: center !important;
    gap: 8px !important;
}

body.admin-studio-shell .studio-top-menu-add input,
body.admin-studio-shell .studio-top-menu-add select,
body.admin-studio-shell .studio-top-menu-add button {
    min-height: 34px !important;
    border-radius: 10px !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .studio-top-menu-add {
        grid-template-columns: 1fr !important;
    }
}

/* Side menu table + compact modal polish */
body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-wrap {
    overflow-x: auto !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table {
    min-width: 1120px !important;
    table-layout: fixed !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td {
    padding: 8px 10px !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(1),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(1) {
    width: 74px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(2),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(2) {
    width: 116px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(3),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(3) {
    width: 230px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(4),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(4) {
    width: 190px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(5),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(5) {
    width: 150px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(6),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(6) {
    width: 210px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(7),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(7) {
    width: 82px !important;
    text-align: center !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table th:nth-child(8),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td:nth-child(8) {
    width: 118px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-row td {
    background: #f7fbff !important;
    border-top: 2px solid #d7e7fb !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-child-row td {
    background: #ffffff !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-child-row td:nth-child(3) {
    padding-left: 20px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-child-row td:nth-child(3)::after {
    content: "";
    position: absolute;
    left: 10px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    border-radius: 99px;
    background: #bfdbfe;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name {
    display: grid;
    gap: 2px;
    min-width: 0;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name strong {
    overflow: hidden;
    color: #17233c;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name small {
    overflow: hidden;
    color: #77859b;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name.is-child {
    padding-left: 12px;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip {
    display: inline-flex;
    max-width: 100%;
    min-height: 26px;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid #d9e6f5;
    border-radius: 999px;
    background: #ffffff;
    color: #41506a;
    font-size: 0.66rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill i,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip i {
    width: 14px;
    height: 14px;
    color: #5b9df8;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill.is-parent {
    border-color: #b7ead8;
    background: #eefcf7;
    color: #177555;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill.is-child {
    background: #f3f6fa;
    color: #617088;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip.is-root {
    border-style: dashed;
    background: #f8fafc;
    color: #8a97aa;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table td {
    position: relative !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions {
    justify-content: flex-start !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions .icon-button {
    width: 30px !important;
    height: 30px !important;
}

body.admin-studio-shell .admin-modal-card {
    display: grid !important;
    width: min(820px, calc(100vw - 28px)) !important;
    max-height: calc(100dvh - 24px) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 0 !important;
    padding: 12px 16px !important;
}

body.admin-studio-shell .admin-modal-head .panel-kicker {
    font-size: 0.68rem !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    font-size: clamp(1.08rem, 1.4vw, 1.34rem) !important;
    line-height: 1.05 !important;
}

body.admin-studio-shell .admin-modal-head .icon-button {
    width: 38px !important;
    height: 38px !important;
}

body.admin-studio-shell .admin-modal-form {
    display: flex !important;
    min-height: 0 !important;
    max-height: none !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #f7faff !important;
}

body.admin-studio-shell .admin-modal-form .admin-form-sections {
    display: grid !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    gap: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 12px 14px !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 11px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .admin-form-section-head {
    gap: 9px !important;
    margin-bottom: 10px !important;
    padding-bottom: 9px !important;
}

body.admin-studio-shell .admin-form-section-head i {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .admin-form-section-head strong {
    font-size: 0.84rem !important;
}

body.admin-studio-shell .admin-form-section-head small {
    font-size: 0.66rem !important;
}

body.admin-studio-shell .admin-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 8px !important;
}

body.admin-studio-shell .admin-field {
    padding: 8px !important;
    border-radius: 12px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .admin-field input,
body.admin-studio-shell .admin-field select,
body.admin-studio-shell .admin-field textarea {
    min-height: 32px !important;
    padding: 7px 9px !important;
    border-radius: 9px !important;
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
}

body.admin-studio-shell .admin-field textarea {
    min-height: 90px !important;
}

body.admin-studio-shell .admin-field .field-hint {
    font-size: 0.62rem !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .admin-modal-actions {
    position: static !important;
    bottom: auto !important;
    z-index: 1 !important;
    flex: 0 0 auto !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    border-top: 1px solid #dde7f3 !important;
    background: #ffffff !important;
    box-shadow: 0 -12px 28px rgba(35, 49, 75, 0.08) !important;
}

body.admin-studio-shell .admin-modal-actions .admin-button {
    min-height: 36px !important;
    border-radius: 11px !important;
    padding: 0 14px !important;
    font-size: 0.76rem !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-modal-card {
        width: calc(100vw - 14px) !important;
        max-height: calc(100dvh - 14px) !important;
        border-radius: 16px !important;
    }

    body.admin-studio-shell .admin-modal-head {
        padding: 10px 12px !important;
    }

    body.admin-studio-shell .admin-modal-form .admin-form-sections {
        padding: 10px !important;
    }

    body.admin-studio-shell .admin-modal-actions {
        justify-content: stretch !important;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
    }

    body.admin-studio-shell .admin-modal-actions .admin-button {
        flex: 1 1 0;
    }
}

/* Side menu table: compact final alignment pass */
body.admin-studio-shell .content-list-panel.is-side-menu-panel {
    overflow: hidden !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table {
    width: 100% !important;
    min-width: 900px !important;
    table-layout: fixed !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ลิงก์"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="กลุ่มเมนูหลัก"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ประเภท"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ไอคอน"] {
    display: table-cell !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
    padding: 6px 8px !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(1),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(1) {
    width: 58px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(2),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(2) {
    width: 96px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(3),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(3) {
    width: 210px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(4),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(4) {
    width: 170px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(5),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(5) {
    width: 130px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(6),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(6) {
    width: auto !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(7),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(7) {
    width: 64px !important;
    text-align: center !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(8),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(8) {
    width: 80px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr {
    height: 50px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr td {
    background-clip: padding-box !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr:nth-child(even) td,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .side-menu-child-row td {
    background: #fbfdff !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .side-menu-parent-row td {
    background: #f7fbff !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .side-menu-child-row td:nth-child(3) {
    padding-left: 16px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .side-menu-child-row td:nth-child(3)::after {
    left: 8px !important;
    top: 10px !important;
    bottom: 10px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .drag-handle {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .drag-handle svg,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .drag-handle i {
    width: 14px !important;
    height: 14px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .drag-order {
    margin-left: 2px !important;
    font-size: 0.66rem !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .pill {
    min-height: 22px !important;
    gap: 4px !important;
    padding: 3px 7px !important;
    border-radius: 999px !important;
    font-size: 0.6rem !important;
    line-height: 1 !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill svg,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill i,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip svg,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip i,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip svg,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip i {
    width: 13px !important;
    height: 13px !important;
    flex: 0 0 13px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name strong {
    font-size: 0.72rem !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name small {
    font-size: 0.57rem !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name.is-child {
    padding-left: 8px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ลิงก์"] {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    white-space: normal !important;
    color: #1c2940 !important;
    font-size: 0.66rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions {
    gap: 4px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions .icon-button {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions .icon-button svg,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions .icon-button i {
    width: 14px !important;
    height: 14px !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table {
        min-width: 860px !important;
    }
}

/* Side menu table: full-width single-line management view. */
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table {
    width: 100% !important;
    min-width: 0 !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(3),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(3) {
    width: 220px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(4),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(4) {
    width: 190px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(5),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(5) {
    width: 138px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(7),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(7) {
    width: 64px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th:nth-child(8),
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td:nth-child(8) {
    width: 92px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr {
    height: 42px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr td {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ชื่อเมนู"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="กลุ่มเมนูหลัก"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ไอคอน"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ลิงก์"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="แสดง"],
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="จัดการ"] {
    white-space: nowrap !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name strong,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill {
    max-width: 100% !important;
    min-width: 0 !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name {
    display: block !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name strong,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .drag-handle {
    width: 24px !important;
    height: 24px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .table-actions .icon-button {
    width: 26px !important;
    height: 26px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-type-pill,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-parent-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .icon-preview-chip,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .pill {
    min-height: 20px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .side-menu-name small {
    display: none !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="ลิงก์"] {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    word-break: normal !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="จัดการ"] .table-actions {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table {
        min-width: 980px !important;
    }
}

/* Side menu table: final compact row sizing. */
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table th,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label] {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    line-height: 1.1 !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table tbody tr {
    height: 38px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .drag-handle {
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    min-height: 22px !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .table-actions,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="จัดการ"] .table-actions {
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
}

body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table .table-actions .icon-button,
body.admin-studio-shell .content-list-panel.is-side-menu-panel .admin-table.is-side-menu-table td[data-label="จัดการ"] .icon-button {
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    border-radius: 8px !important;
}

/* Admin dashboard and website check: table-first layout. */
body.admin-studio-shell .admin-dashboard-page,
body.admin-studio-shell .dashboard-panel {
    display: grid;
    gap: 16px;
}

body.admin-studio-shell .dashboard-title-row,
body.admin-studio-shell .dashboard-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.admin-studio-shell .dashboard-title-row h2,
body.admin-studio-shell .dashboard-section-head h3 {
    margin: 2px 0 0;
    color: #152238;
    font-weight: 950;
    line-height: 1.15;
}

body.admin-studio-shell .dashboard-title-row p {
    margin: 4px 0 0;
    color: #65748b;
    font-size: 0.82rem;
    font-weight: 750;
}

body.admin-studio-shell .dashboard-grid-table {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: 16px;
    margin: 16px 0;
}

body.admin-studio-shell .dashboard-table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid #dbe8f6;
    border-radius: 14px;
    background: #ffffff;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table th {
    background: #f6f9fd;
    color: #60718b;
    font-size: 0.7rem;
    font-weight: 950;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table th,
body.admin-studio-shell .dashboard-table-wrap .admin-table td {
    border-bottom: 1px solid #e7eef7;
    padding: 12px 14px;
    vertical-align: middle;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table tbody tr:last-child td {
    border-bottom: 0;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table td strong {
    display: block;
    color: #17233c;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.25;
}

body.admin-studio-shell .dashboard-table-wrap .admin-table td small {
    display: block;
    margin-top: 3px;
    color: #697890;
    font-size: 0.68rem;
    font-weight: 780;
    line-height: 1.25;
}

body.admin-studio-shell .dashboard-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.86rem;
    font-weight: 950;
}

body.admin-studio-shell .pill.warning {
    background: #fff7ed;
    color: #b45309;
}

body.admin-studio-shell .pill.danger {
    background: #fff1f2;
    color: #be123c;
}

body.admin-studio-shell .audit-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 950;
    white-space: nowrap;
}

body.admin-studio-shell .audit-status.is-ok {
    background: #ecfdf5;
    color: #047857;
}

body.admin-studio-shell .audit-status.is-warning {
    background: #fff7ed;
    color: #b45309;
}

body.admin-studio-shell .audit-status.is-danger {
    background: #fff1f2;
    color: #be123c;
}

body.admin-studio-shell .site-check-row.is-danger td {
    background: #fff7f8;
}

body.admin-studio-shell .site-check-row.is-warning td {
    background: #fffaf3;
}

body.admin-studio-shell .dashboard-empty-cell {
    color: #64748b;
    font-weight: 850;
    text-align: center;
}

@media (max-width: 1100px) {
    body.admin-studio-shell .dashboard-grid-table {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    body.admin-studio-shell .dashboard-title-row,
    body.admin-studio-shell .dashboard-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    body.admin-studio-shell .dashboard-title-row .admin-button,
    body.admin-studio-shell .dashboard-title-row .ghost-button {
        width: 100%;
        justify-content: center;
    }
}

/* School settings: formal control center with section navigation. */
body.admin-studio-shell .settings-workbench {
    padding: 16px !important;
    border: 1px solid #d7e3f3 !important;
    border-radius: 20px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.95)),
        #ffffff !important;
}

body.admin-studio-shell .settings-brief {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
    padding: 15px;
    border: 1px solid #d7e3f3;
    border-left: 5px solid #1d4ed8;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
}

body.admin-studio-shell .settings-identity {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    min-width: 0;
}

body.admin-studio-shell .settings-identity-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid #cfe0f4;
    border-radius: 17px;
    background: #eff6ff;
    color: #1d4ed8;
}

body.admin-studio-shell .settings-identity-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7px;
    background: #ffffff;
}

body.admin-studio-shell .settings-identity-mark svg,
body.admin-studio-shell .settings-identity-mark i {
    width: 26px;
    height: 26px;
}

body.admin-studio-shell .settings-identity .panel-kicker {
    color: #dc4f83 !important;
    font-size: 0.68rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .settings-identity h2 {
    margin: 3px 0 0;
    overflow: hidden;
    color: #17233c;
    font-size: clamp(1.18rem, 1.55vw, 1.55rem);
    font-weight: 950;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .settings-identity p {
    max-width: 820px;
    margin: 4px 0 0;
    overflow: hidden;
    color: #63728a;
    font-size: 0.8rem;
    font-weight: 820;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .settings-brief-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

body.admin-studio-shell .settings-brief-facts span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    max-width: 250px;
    padding: 0 11px;
    overflow: hidden;
    border: 1px solid #dce7f5;
    border-radius: 999px;
    background: #ffffff;
    color: #42516a;
    font-size: 0.72rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .settings-brief-facts svg,
body.admin-studio-shell .settings-brief-facts i {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: #1d4ed8;
}

body.admin-studio-shell .settings-redesign {
    display: grid;
    gap: 16px;
}

body.admin-studio-shell .settings-layout {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

body.admin-studio-shell .settings-nav-panel {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 12px;
    padding: 13px;
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fbff),
        #ffffff;
}

body.admin-studio-shell .settings-nav-panel > strong {
    color: #17233c;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .settings-nav-panel nav {
    display: grid;
    gap: 7px;
}

body.admin-studio-shell .settings-nav-panel a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 42px;
    padding: 6px 8px;
    color: #334155;
    border: 1px solid #dce7f5;
    border-radius: 12px;
    background: #ffffff;
    font-size: 0.74rem;
    font-weight: 900;
    text-decoration: none;
}

body.admin-studio-shell .settings-nav-panel a:hover {
    color: #1d4ed8;
    border-color: #bcd5fb;
    background: #f5f9ff;
}

body.admin-studio-shell .settings-nav-panel a svg,
body.admin-studio-shell .settings-nav-panel a i {
    width: 30px;
    height: 30px;
    padding: 7px;
    color: #1d4ed8;
    border-radius: 10px;
    background: #eff6ff;
}

body.admin-studio-shell .settings-nav-panel a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .settings-nav-panel a b {
    display: grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #52637b;
    font-size: 0.66rem;
    font-weight: 950;
}

body.admin-studio-shell .settings-mini-summary {
    display: grid;
    gap: 5px;
    padding: 11px;
    border: 1px solid #d8eadf;
    border-radius: 14px;
    background: #f7fffb;
}

body.admin-studio-shell .settings-mini-summary span,
body.admin-studio-shell .settings-mini-summary small {
    color: #63728a;
    font-size: 0.68rem;
    font-weight: 820;
    line-height: 1.35;
}

body.admin-studio-shell .settings-mini-summary strong {
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 950;
    line-height: 1.25;
}

body.admin-studio-shell .settings-editor {
    display: grid !important;
    gap: 14px !important;
    min-width: 0;
}

body.admin-studio-shell .settings-section {
    scroll-margin-top: 18px;
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid #d7e3f3 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .settings-section-head {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 11px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 13px 14px !important;
    border-bottom: 1px solid #e5edf7 !important;
    background: linear-gradient(90deg, #f8fbff, #ffffff) !important;
}

body.admin-studio-shell .settings-section-head > svg,
body.admin-studio-shell .settings-section-head > i {
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    color: #ffffff !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.16) !important;
}

body.admin-studio-shell .settings-section-head strong {
    display: block;
    color: #17233c !important;
    font-size: 0.98rem !important;
    font-weight: 950 !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .settings-section-head small {
    display: block;
    margin-top: 3px !important;
    color: #68768c !important;
    font-size: 0.7rem !important;
    font-weight: 820 !important;
    line-height: 1.32 !important;
}

body.admin-studio-shell .settings-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

body.admin-studio-shell .settings-field {
    display: grid !important;
    gap: 7px !important;
    min-width: 0;
    padding: 11px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 13px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .settings-field.wide {
    grid-column: 1 / -1;
}

body.admin-studio-shell .settings-field > span {
    color: #34445c;
    font-size: 0.73rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .settings-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.admin-studio-shell .settings-field select,
body.admin-studio-shell .settings-field textarea {
    width: 100%;
    min-height: 40px !important;
    padding: 8px 10px !important;
    color: #17233c !important;
    border: 1px solid #cfdbea !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 840 !important;
    box-shadow: none !important;
}

body.admin-studio-shell .settings-field textarea {
    min-height: 104px !important;
    resize: vertical;
    line-height: 1.5 !important;
}

body.admin-studio-shell .settings-field input[type="file"] {
    padding: 8px !important;
    color: #52637b !important;
}

body.admin-studio-shell .settings-field .link-picker {
    display: grid;
    gap: 8px;
    padding: 0;
    background: transparent !important;
}

body.admin-studio-shell .settings-field .link-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

body.admin-studio-shell .settings-field .link-test-button {
    min-height: 40px;
    white-space: nowrap;
}

body.admin-studio-shell .settings-field .settings-image-preview {
    width: min(100%, 340px);
    margin-top: 3px;
    border-radius: 14px;
}

body.admin-studio-shell .settings-field .settings-image-preview img {
    max-height: 150px;
    object-fit: contain;
    background: #f8fafc;
}

body.admin-studio-shell .settings-field .field-hint {
    color: #66758c !important;
    font-size: 0.68rem !important;
    font-weight: 780 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .settings-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #d8e4f1;
    border-radius: 14px;
    background: #f8fbff;
}

body.admin-studio-shell .settings-toggle-row input[type="checkbox"] {
    width: 24px;
    height: 24px;
    accent-color: #111827;
}

body.admin-studio-shell .settings-toggle-row b {
    color: #17233c;
    font-size: 0.98rem;
    font-weight: 850;
}

body.admin-studio-shell .settings-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(23, 35, 59, 0.1);
    backdrop-filter: blur(12px);
}

@media (max-width: 1180px) {
    body.admin-studio-shell .settings-brief,
    body.admin-studio-shell .settings-layout {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .settings-nav-panel {
        position: static;
    }

    body.admin-studio-shell .settings-nav-panel nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.admin-studio-shell .settings-brief-facts {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .settings-workbench {
        padding: 12px !important;
        border-radius: 18px !important;
    }

    body.admin-studio-shell .settings-identity,
    body.admin-studio-shell .settings-field-grid,
    body.admin-studio-shell .settings-nav-panel nav,
    body.admin-studio-shell .settings-field .link-picker-row {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .settings-identity h2,
    body.admin-studio-shell .settings-identity p {
        white-space: normal;
    }

    body.admin-studio-shell .settings-actions {
        position: static;
        flex-direction: column;
    }

    body.admin-studio-shell .settings-actions .ghost-button,
    body.admin-studio-shell .settings-actions .admin-button {
        justify-content: center;
        width: 100%;
    }
}

/* Header workspace: formal editorial editor with live visual context. */
body.admin-studio-shell .studio-header-workbench {
    padding: 16px !important;
    border: 1px solid #d7e3f3 !important;
    border-radius: 20px !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94)),
        #ffffff !important;
}

body.admin-studio-shell .studio-header-redesign {
    display: grid;
    gap: 16px;
}

body.admin-studio-shell .studio-header-brief {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d7e3f3;
    border-left: 5px solid #2563eb;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
}

body.admin-studio-shell .studio-header-brand-snapshot {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
}

body.admin-studio-shell .studio-header-logo-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    overflow: hidden;
    border: 1px solid #cfe0f4;
    border-radius: 16px;
    background: #f8fbff;
    color: #2563eb;
}

body.admin-studio-shell .studio-header-logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

body.admin-studio-shell .studio-header-logo-mark svg,
body.admin-studio-shell .studio-header-logo-mark i {
    width: 24px;
    height: 24px;
}

body.admin-studio-shell .studio-header-brand-snapshot small {
    display: block;
    color: #dc4f83;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1;
}

body.admin-studio-shell .studio-header-brand-snapshot strong {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #17233c;
    font-size: clamp(1.1rem, 1.45vw, 1.48rem);
    font-weight: 950;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-header-brand-snapshot em {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #63728a;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-header-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

body.admin-studio-shell .studio-header-status-strip > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid #dce7f5;
    border-radius: 999px;
    background: #ffffff;
    color: #42516a;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

body.admin-studio-shell .studio-header-status-strip svg,
body.admin-studio-shell .studio-header-status-strip i {
    width: 15px;
    height: 15px;
    color: #2563eb;
}

body.admin-studio-shell .studio-header-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
    gap: 18px;
    align-items: start;
}

body.admin-studio-shell .studio-header-preview-pane {
    position: sticky;
    top: 14px;
    min-width: 0;
}

body.admin-studio-shell .studio-header-preview-browser {
    overflow: hidden;
    border: 1px solid #cfdced;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(23, 35, 59, 0.08);
}

body.admin-studio-shell .studio-header-preview-top {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 68px;
    padding: 12px 14px;
    background: var(--preview-header-bg, #ffffff);
    color: var(--preview-header-text, #263044);
    border-bottom: 1px solid rgba(31, 42, 68, 0.08);
}

body.admin-studio-shell .studio-header-preview-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid rgba(31, 42, 68, 0.12);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.86);
}

body.admin-studio-shell .studio-header-preview-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

body.admin-studio-shell .studio-header-preview-logo svg,
body.admin-studio-shell .studio-header-preview-logo i {
    width: 20px;
    height: 20px;
}

body.admin-studio-shell .studio-header-preview-top strong,
body.admin-studio-shell .studio-header-preview-top small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-header-preview-top strong {
    font-size: 0.94rem;
    font-weight: 950;
    line-height: 1.15;
}

body.admin-studio-shell .studio-header-preview-top small {
    margin-top: 2px;
    opacity: 0.78;
    font-size: 0.68rem;
    font-weight: 850;
}

body.admin-studio-shell .studio-header-preview-hero {
    position: relative;
    display: grid;
    min-height: 360px;
    align-items: end;
    overflow: hidden;
    background:
        linear-gradient(135deg, #dbeafe, #fdf2f8 55%, #f8fafc),
        #eef4fb;
}

body.admin-studio-shell .studio-header-preview-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.admin-studio-shell .studio-header-preview-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.58));
}

body.admin-studio-shell .studio-header-preview-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #7c8ca5;
}

body.admin-studio-shell .studio-header-preview-placeholder svg,
body.admin-studio-shell .studio-header-preview-placeholder i {
    width: 52px;
    height: 52px;
}

body.admin-studio-shell .studio-header-preview-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 9px;
    padding: 24px;
}

body.admin-studio-shell .studio-header-preview-copy > span {
    width: max-content;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid var(--badge-border, rgba(255, 255, 255, 0.7));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--badge-text, #9b4b63);
    font-size: 0.7rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-header-preview-copy strong {
    color: var(--hero-title-color, #ffffff);
    font-size: clamp(1.32rem, 2.2vw, 2rem);
    font-weight: 950;
    line-height: 1.08;
    text-shadow: 0 2px 18px rgba(15, 23, 42, 0.34);
}

body.admin-studio-shell .studio-header-preview-copy p {
    max-width: 38ch;
    margin: 0;
    color: var(--hero-subtitle-color, #ffffff);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.5;
    opacity: 0.94;
}

body.admin-studio-shell .studio-header-preview-copy b {
    width: max-content;
    max-width: 100%;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #ffffff;
    color: #17233c;
    font-size: 0.72rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-header-fields {
    display: grid;
    gap: 14px;
    min-width: 0;
}

body.admin-studio-shell .studio-header-section {
    overflow: hidden;
    border: 1px solid #d7e3f3;
    border-radius: 18px;
    background: #ffffff;
}

body.admin-studio-shell .studio-header-section > header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 13px 14px;
    border-bottom: 1px solid #e5edf7;
    background: linear-gradient(90deg, #f8fbff, #ffffff);
}

body.admin-studio-shell .studio-header-section > header > span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d7e7fb;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
}

body.admin-studio-shell .studio-header-section > header svg,
body.admin-studio-shell .studio-header-section > header i {
    width: 19px;
    height: 19px;
}

body.admin-studio-shell .studio-header-section > header strong {
    display: block;
    color: #17233c;
    font-size: 0.96rem;
    font-weight: 950;
    line-height: 1.18;
}

body.admin-studio-shell .studio-header-section > header small {
    display: block;
    margin-top: 3px;
    color: #68768c;
    font-size: 0.7rem;
    font-weight: 820;
    line-height: 1.32;
}

body.admin-studio-shell .studio-header-identity-summary > header {
    grid-template-columns: 40px minmax(0, 1fr) auto;
}

body.admin-studio-shell .studio-header-settings-link {
    min-height: 38px;
    padding: 0 12px;
    white-space: nowrap;
}

body.admin-studio-shell .studio-header-identity-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    margin: 14px 14px 0;
    padding: 13px;
    border: 1px solid #dbe6f3;
    border-radius: 15px;
    background:
        linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%),
        #ffffff;
}

body.admin-studio-shell .studio-header-identity-card .studio-header-logo-mark {
    width: 58px;
    height: 58px;
}

body.admin-studio-shell .studio-header-identity-card small,
body.admin-studio-shell .studio-header-readonly-grid small {
    display: block;
    color: #66758c;
    font-size: 0.68rem;
    font-weight: 880;
    line-height: 1.2;
}

body.admin-studio-shell .studio-header-identity-card strong {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #17233c;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .studio-header-identity-card p {
    margin: 5px 0 0;
    color: #52637b;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.3;
}

body.admin-studio-shell .studio-header-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px 14px;
}

body.admin-studio-shell .studio-header-readonly-grid > span {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 11px;
    border: 1px solid #dbe6f3;
    border-radius: 13px;
    background: #fbfdff;
}

body.admin-studio-shell .studio-header-readonly-grid .is-wide {
    grid-column: 1 / -1;
}

body.admin-studio-shell .studio-header-readonly-grid strong {
    overflow-wrap: anywhere;
    color: #17233c;
    font-size: 0.82rem;
    font-weight: 890;
    line-height: 1.45;
}

body.admin-studio-shell .studio-header-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

body.admin-studio-shell .studio-header-field-grid label,
body.admin-studio-shell .studio-header-upload {
    display: grid !important;
    gap: 7px !important;
    min-width: 0;
    padding: 11px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 13px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-header-field-grid label > span,
body.admin-studio-shell .studio-header-upload > span,
body.admin-studio-shell .studio-header-color-field > span {
    color: #34445c;
    font-size: 0.73rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .studio-header-field-grid input[type="text"],
body.admin-studio-shell .studio-header-field-grid input[type="number"],
body.admin-studio-shell .studio-header-field-grid input[type="file"],
body.admin-studio-shell .studio-header-field-grid textarea {
    width: 100%;
    min-height: 40px !important;
    padding: 8px 10px !important;
    color: #17233c !important;
    border: 1px solid #cfdbea !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    font-size: 0.8rem !important;
    font-weight: 840 !important;
    line-height: 1.35 !important;
    box-shadow: none !important;
}

body.admin-studio-shell .studio-header-field-grid textarea {
    min-height: 104px !important;
    resize: vertical;
    line-height: 1.5 !important;
}

body.admin-studio-shell .studio-header-field-grid input[type="file"] {
    padding: 8px !important;
    color: #52637b !important;
}

body.admin-studio-shell .studio-header-field-grid .is-wide {
    grid-column: 1 / -1;
}

body.admin-studio-shell .studio-header-upload .admin-image-preview {
    width: min(100%, 320px);
    margin-top: 3px;
    border-radius: 14px;
}

body.admin-studio-shell .studio-hero-size-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 11px;
    border: 1px solid #cfe0f6;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 247, 252, 0.94));
}

body.admin-studio-shell .studio-hero-size-note svg,
body.admin-studio-shell .studio-hero-size-note i {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    color: #2563eb;
}

body.admin-studio-shell .studio-hero-size-note span {
    display: grid;
    gap: 3px;
}

body.admin-studio-shell .studio-hero-size-note strong {
    color: #17233c;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.25;
}

body.admin-studio-shell .studio-hero-size-note small {
    color: #5e6d84;
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.45;
}

body.admin-studio-shell .studio-hero-upload-help {
    color: #6a7890;
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.45;
}

body.admin-studio-shell .studio-hero-image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

body.admin-studio-shell .studio-header-upload .studio-hero-image-card {
    width: 100%;
    margin-top: 0;
}

body.admin-studio-shell .studio-hero-crop-output-list {
    display: none;
}

body.admin-studio-shell .studio-hero-crop-preview-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px;
}

body.admin-studio-shell .studio-hero-crop-preview-card {
    display: grid;
    gap: 7px;
    padding: 8px;
    border: 1px solid #cfe0f6;
    border-radius: 13px;
    background: #ffffff;
}

body.admin-studio-shell .studio-hero-crop-preview-card span {
    min-height: 76px;
    border-radius: 10px;
    background: #eef4fb center / cover no-repeat;
}

body.admin-studio-shell .studio-hero-crop-preview-card strong {
    color: #34445c;
    font-size: 0.72rem;
    font-weight: 900;
}

body.admin-studio-shell .studio-header-upload .admin-image-preview img {
    max-height: 150px;
    object-fit: contain;
    background: #f8fafc;
}

body.admin-studio-shell .studio-header-toggle {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px !important;
    align-items: start;
    padding: 12px !important;
    border: 1px solid #d9e6f5 !important;
    border-radius: 13px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-header-toggle input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #2563eb;
}

body.admin-studio-shell .studio-header-toggle strong,
body.admin-studio-shell .studio-header-toggle small {
    display: block;
}

body.admin-studio-shell .studio-header-toggle strong {
    color: #17233c;
    font-size: 0.82rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-header-toggle small {
    margin-top: 2px;
    color: #68768c;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
}

body.admin-studio-shell .studio-header-control-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 15px !important;
    background: #f3f7fc !important;
}

body.admin-studio-shell .studio-header-control-grid .studio-header-toggle {
    min-height: 88px;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-hero-stat-editor {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 15px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-hero-stat-editor > div {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #d7e2f0;
    border-radius: 13px;
    background: #ffffff;
}

body.admin-studio-shell .studio-hero-stat-editor label {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .studio-header-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    padding: 14px;
}

body.admin-studio-shell .studio-header-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 30px;
    gap: 9px;
    align-items: center;
    min-height: 48px;
    padding: 9px 10px;
    border: 1px solid #dbe6f3;
    border-radius: 13px;
    background: #fbfdff;
}

body.admin-studio-shell .studio-header-color-field input[type="color"] {
    width: 46px;
    height: 32px;
    padding: 2px;
    border: 1px solid #cbd8e8;
    border-radius: 9px;
    background: #ffffff;
}

body.admin-studio-shell .studio-header-color-field b {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(31, 42, 68, 0.12);
    border-radius: 9px;
    background: var(--studio-color, #ffffff);
}

body.admin-studio-shell .studio-header-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(23, 35, 59, 0.1);
    backdrop-filter: blur(12px);
}

@media (max-width: 1180px) {
    body.admin-studio-shell .studio-header-layout {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-header-preview-pane {
        position: static;
    }

    body.admin-studio-shell .studio-header-preview-hero {
        min-height: 300px;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .studio-header-workbench {
        padding: 12px !important;
        border-radius: 18px !important;
    }

    body.admin-studio-shell .studio-header-brief,
    body.admin-studio-shell .studio-header-section > header,
    body.admin-studio-shell .studio-header-identity-summary > header,
    body.admin-studio-shell .studio-header-readonly-grid,
    body.admin-studio-shell .studio-header-field-grid {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .studio-hero-stat-editor {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-header-status-strip {
        justify-content: flex-start;
    }

    body.admin-studio-shell .studio-header-preview-hero {
        min-height: 250px;
    }

    body.admin-studio-shell .studio-header-preview-copy {
        padding: 18px;
    }

    body.admin-studio-shell .studio-header-actions {
        position: static;
        align-items: stretch;
        flex-direction: column;
    }

    body.admin-studio-shell .studio-header-actions .admin-button,
    body.admin-studio-shell .studio-header-actions .ghost-button {
        justify-content: center;
        width: 100%;
    }
}

/* Side menu management: structured tree list. */
body.admin-studio-shell .side-menu-tree-shell {
    width: 100%;
    overflow: hidden;
    border: 1px solid #dbe8f6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(42, 73, 116, 0.08);
}

body.admin-studio-shell .side-menu-tree-head,
body.admin-studio-shell .side-menu-tree-row {
    display: grid;
    grid-template-columns: 56px minmax(280px, 1.12fr) minmax(220px, 0.9fr) 76px minmax(280px, 300px);
    align-items: center;
    gap: 0;
}

body.admin-studio-shell .side-menu-tree-head {
    padding: 10px 14px;
    border-bottom: 1px solid #dbe8f6;
    background: #f5f9ff;
    color: #60718b;
    font-size: 0.68rem;
    font-weight: 950;
}

body.admin-studio-shell .side-menu-tree-list {
    display: grid;
    gap: 0;
}

body.admin-studio-shell .side-menu-tree-row {
    min-height: 66px;
    padding: 0 14px;
    border-bottom: 1px solid #e7eef7;
    background: #ffffff;
}

body.admin-studio-shell .side-menu-tree-row:last-child {
    border-bottom: 0;
}

body.admin-studio-shell .side-menu-tree-row.is-parent {
    border-top: 2px solid #d7e8fb;
    background: #f7fbff;
}

body.admin-studio-shell .side-menu-tree-row.is-child {
    background: #ffffff;
}

body.admin-studio-shell .side-menu-tree-row.is-disabled {
    opacity: 0.62;
}

body.admin-studio-shell .side-menu-tree-row.is-warning {
    background: #fffaf3;
}

body.admin-studio-shell .side-menu-tree-row.is-collapsed-child {
    display: none !important;
}

body.admin-studio-shell .side-menu-tree-row:hover {
    background: #f1f7ff;
}

body.admin-studio-shell .side-menu-tree-drag {
    justify-self: start;
}

body.admin-studio-shell .side-menu-tree-main,
body.admin-studio-shell .side-menu-tree-route {
    display: grid;
    min-width: 0;
    gap: 5px;
    padding: 8px 10px;
}

body.admin-studio-shell .side-menu-tree-main {
    position: relative;
}

body.admin-studio-shell .side-menu-tree-row.is-child .side-menu-tree-main {
    padding-left: 28px;
}

body.admin-studio-shell .side-menu-tree-row.is-child .side-menu-tree-main::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 99px;
    background: #bfdbfe;
}

body.admin-studio-shell .side-menu-tree-main strong {
    overflow: hidden;
    color: #17233c;
    font-size: 0.9rem;
    font-weight: 950;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .side-menu-tree-main small,
body.admin-studio-shell .side-menu-url {
    overflow: hidden;
    color: #66758c;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .side-menu-tree-route .icon-preview-chip {
    width: fit-content;
    max-width: min(100%, 210px);
}

body.admin-studio-shell .side-menu-warning {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: #b45309;
    font-size: 0.64rem;
    font-weight: 950;
}

body.admin-studio-shell .side-menu-warning svg,
body.admin-studio-shell .side-menu-warning i {
    width: 13px;
    height: 13px;
}

body.admin-studio-shell .side-menu-tree-status {
    display: flex;
    justify-content: center;
    padding: 8px 10px;
}

body.admin-studio-shell .side-menu-tree-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 10px;
}

body.admin-studio-shell .side-menu-tree-actions form {
    margin: 0;
}

body.admin-studio-shell .side-menu-tree-actions .icon-button {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 10px;
}

body.admin-studio-shell .side-menu-tree-actions .side-menu-content-button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.72rem;
}

body.admin-studio-shell .side-menu-tree-actions .side-menu-content-button svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .side-menu-tree-shell {
        overflow-x: auto;
    }

    body.admin-studio-shell .side-menu-tree-head,
    body.admin-studio-shell .side-menu-tree-row {
        min-width: 1040px;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .side-menu-tree-head {
        display: none;
    }

    body.admin-studio-shell .side-menu-tree-shell {
        overflow: visible;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    body.admin-studio-shell .side-menu-tree-list {
        gap: 10px;
    }

    body.admin-studio-shell .side-menu-tree-row {
        min-width: 0;
        grid-template-columns: 38px 1fr;
        gap: 8px;
        min-height: 0;
        padding: 12px;
        border: 1px solid #dbe8f6;
        border-radius: 16px;
        box-shadow: 0 12px 28px rgba(42, 73, 116, 0.07);
    }

    body.admin-studio-shell .side-menu-tree-row.is-child {
        margin-left: 12px;
    }

    body.admin-studio-shell .side-menu-tree-main,
    body.admin-studio-shell .side-menu-tree-route,
    body.admin-studio-shell .side-menu-tree-status,
    body.admin-studio-shell .side-menu-tree-actions {
        grid-column: 2;
        padding: 0;
    }

    body.admin-studio-shell .side-menu-tree-drag {
        grid-row: 1 / span 4;
    }

    body.admin-studio-shell .side-menu-tree-status {
        justify-content: flex-start;
    }
}

/* Website Studio theme settings: formal compact table layout. */
body.admin-studio-shell .studio-theme-table-shell {
    display: grid !important;
    width: min(100%, 1480px) !important;
    margin-inline: auto !important;
    gap: 12px !important;
}

body.admin-studio-shell .studio-theme-preset-panel {
    display: grid !important;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 360px) minmax(260px, 420px) !important;
    gap: 12px !important;
    align-items: stretch !important;
    padding: 14px !important;
    border: 1px solid #dbe6f3 !important;
    border-left: 5px solid #2563eb !important;
    border-radius: 18px !important;
    background:
        linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.95)),
        #ffffff !important;
    box-shadow: 0 14px 34px rgba(31, 42, 68, 0.06) !important;
}

body.admin-studio-shell .studio-theme-preset-copy {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-theme-preset-copy span {
    color: #cf4774 !important;
    font-size: 0.68rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

body.admin-studio-shell .studio-theme-preset-copy h3 {
    margin: 4px 0 0 !important;
    color: #1f2a44 !important;
    font-size: 1.2rem !important;
    line-height: 1.15 !important;
}

body.admin-studio-shell .studio-theme-preset-copy p {
    max-width: 760px !important;
    margin: 5px 0 0 !important;
    color: #667389 !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    line-height: 1.42 !important;
}

body.admin-studio-shell .studio-theme-preset-select {
    display: grid !important;
    gap: 7px !important;
    align-content: center !important;
    min-width: 0 !important;
    padding: 11px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 14px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-theme-preset-select span {
    color: #34445c !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .studio-theme-preset-select select {
    width: 100% !important;
    min-height: 40px !important;
    padding: 8px 10px !important;
    color: #17233c !important;
    border: 1px solid #cfdbea !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 880 !important;
    box-shadow: none !important;
}

body.admin-studio-shell .studio-theme-preset-preview {
    display: grid !important;
    gap: 7px !important;
    align-content: center !important;
    min-width: 0 !important;
    padding: 12px !important;
    border: 1px solid color-mix(in srgb, var(--preset-accent, #2563eb) 28%, #dbe6f3) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--preset-accent, #2563eb) 9%, #ffffff), #ffffff) !important;
}

body.admin-studio-shell .studio-theme-preset-preview strong {
    overflow: hidden !important;
    color: #1f2a44 !important;
    font-size: 0.94rem !important;
    font-weight: 950 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-theme-preset-preview small {
    color: #667389 !important;
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .studio-theme-preset-swatches {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 2px !important;
}

body.admin-studio-shell .studio-theme-preset-swatches span {
    width: 28px !important;
    height: 22px !important;
    border: 1px solid rgba(31, 42, 68, 0.14) !important;
    border-radius: 8px !important;
    background: var(--preset-swatch, #ffffff) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42) !important;
}

body.admin-studio-shell .studio-theme-table-card {
    overflow: hidden !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(31, 42, 68, 0.06) !important;
}

body.admin-studio-shell .studio-theme-table-card:nth-of-type(1) {
    border-left: 5px solid #5b8def !important;
}

body.admin-studio-shell .studio-theme-table-card:nth-of-type(2) {
    border-left: 5px solid #9b7cf5 !important;
}

body.admin-studio-shell .studio-theme-table-card:nth-of-type(3) {
    border-left: 5px solid #2fbfa6 !important;
}

body.admin-studio-shell .studio-theme-table-card:nth-of-type(4) {
    border-left: 5px solid #e05c8f !important;
}

body.admin-studio-shell .studio-theme-table-card:nth-of-type(5) {
    border-left: 5px solid #f59e0b !important;
}

body.admin-studio-shell .studio-theme-table-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #e7eef7 !important;
    background: linear-gradient(90deg, rgba(248, 251, 255, 0.98), rgba(255, 248, 251, 0.86)) !important;
}

body.admin-studio-shell .studio-theme-table-head span {
    display: inline-flex !important;
    margin: 0 0 2px !important;
    color: #cf4774 !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.admin-studio-shell .studio-theme-table-head h3 {
    margin: 0 !important;
    color: #1f2a44 !important;
    font-size: 1.1rem !important;
    line-height: 1.1 !important;
}

body.admin-studio-shell .studio-theme-table-head p {
    max-width: 820px !important;
    margin: 3px 0 0 !important;
    color: #667389 !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .studio-theme-reset {
    min-height: 32px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 0.72rem !important;
}

body.admin-studio-shell .studio-theme-table-wrap {
    width: 100% !important;
    overflow-x: auto !important;
}

body.admin-studio-shell .studio-theme-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}

body.admin-studio-shell .studio-theme-table th,
body.admin-studio-shell .studio-theme-table td {
    padding: 9px 14px !important;
    border-bottom: 1px solid #e7eef7 !important;
    color: #263044 !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .studio-theme-table th {
    background: #f5f8fc !important;
    color: #617089 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    text-align: left !important;
}

body.admin-studio-shell .studio-theme-table tr:last-child td {
    border-bottom: 0 !important;
}

body.admin-studio-shell .studio-theme-table th:nth-child(1),
body.admin-studio-shell .studio-theme-table td:nth-child(1) {
    width: 30% !important;
}

body.admin-studio-shell .studio-theme-table th:nth-child(2),
body.admin-studio-shell .studio-theme-table td:nth-child(2) {
    width: 20% !important;
}

body.admin-studio-shell .studio-theme-table th:nth-child(3),
body.admin-studio-shell .studio-theme-table td:nth-child(3) {
    width: 20% !important;
}

body.admin-studio-shell .studio-theme-table th:nth-child(4),
body.admin-studio-shell .studio-theme-table td:nth-child(4) {
    width: 30% !important;
}

body.admin-studio-shell .studio-theme-table td strong {
    display: block !important;
    overflow: hidden !important;
    color: #1f2a44 !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-theme-table td small {
    display: block !important;
    margin-top: 2px !important;
    color: #8a97aa !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

body.admin-studio-shell .studio-theme-table td:last-child {
    color: #667389 !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

body.admin-studio-shell .theme-value-preview {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 28px !important;
    padding: 3px 8px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 999px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .theme-color-dot {
    width: 18px !important;
    height: 18px !important;
    border: 1px solid rgba(31, 42, 68, 0.14) !important;
    border-radius: 6px !important;
    background: var(--theme-color) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45) !important;
}

body.admin-studio-shell .studio-theme-table code {
    color: #364158 !important;
    font-family: inherit !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .theme-color-input {
    width: 38px !important;
    min-width: 38px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px !important;
    border: 1px solid #cfdbea !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    cursor: pointer !important;
}

body.admin-studio-shell .theme-color-input::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}

body.admin-studio-shell .theme-color-input::-webkit-color-swatch {
    border: 0 !important;
    border-radius: 5px !important;
}

body.admin-studio-shell .theme-number-control {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

body.admin-studio-shell .theme-number-input,
body.admin-studio-shell .theme-font-select {
    min-height: 32px !important;
    border: 1px solid #d7e2f0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: #24304a !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
}

body.admin-studio-shell .theme-number-input {
    width: 82px !important;
    padding: 0 8px !important;
}

body.admin-studio-shell .theme-font-select {
    width: 170px !important;
    padding: 0 10px !important;
}

body.admin-studio-shell .theme-number-control span {
    color: #728096 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-theme-actions {
    position: sticky !important;
    bottom: 12px !important;
    z-index: 5 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 14px 34px rgba(31, 42, 68, 0.08) !important;
    backdrop-filter: blur(12px) !important;
}

body.admin-studio-shell .studio-theme-actions .admin-button,
body.admin-studio-shell .studio-theme-actions .ghost-button {
    min-height: 36px !important;
    padding: 0 14px !important;
    border-radius: 11px !important;
    font-size: 0.76rem !important;
}

@media (max-width: 900px) {
    body.admin-studio-shell .studio-theme-preset-panel {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-theme-table-head {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-theme-reset {
        justify-content: center !important;
        width: 100% !important;
    }

    body.admin-studio-shell .studio-theme-table {
        min-width: 720px !important;
    }
}

@media (max-width: 640px) {
    body.admin-studio-shell .studio-theme-table-shell {
        gap: 10px !important;
    }

    body.admin-studio-shell .studio-theme-preset-panel {
        padding: 12px !important;
        border-radius: 14px !important;
    }

    body.admin-studio-shell .studio-theme-table-card {
        border-radius: 14px !important;
    }

    body.admin-studio-shell .studio-theme-table-head {
        padding: 12px !important;
    }

    body.admin-studio-shell .studio-theme-table-head h3 {
        font-size: 1rem !important;
    }

    body.admin-studio-shell .studio-theme-actions {
        position: static !important;
        flex-direction: column !important;
    }
}

/* Formal modal and icon selection refresh */
body.admin-studio-shell .admin-modal-card {
    width: min(940px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - 28px) !important;
    overflow: hidden !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 28px 70px rgba(20, 31, 52, 0.24) !important;
}

body.admin-studio-shell .admin-modal-backdrop {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(7px) !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 76px !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid #dfe8f4 !important;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(224, 82, 131, 0.06)),
        #ffffff !important;
}

body.admin-studio-shell .admin-modal-head .panel-kicker {
    color: #e05283 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    margin-top: 2px !important;
    color: #17223a !important;
    font-size: clamp(1.35rem, 1.7vw, 1.72rem) !important;
    font-weight: 900 !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .admin-modal-head .icon-button {
    width: 42px !important;
    height: 42px !important;
    color: #24324d !important;
    border-color: #d8e4f1 !important;
    background: #ffffff !important;
}

body.admin-studio-shell .admin-modal-form {
    background: #f6f9fd !important;
}

body.admin-studio-shell .admin-modal-form .admin-form-sections {
    gap: 14px !important;
    padding: 16px !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 16px !important;
    border: 1px solid #dfe8f4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.06) !important;
}

body.admin-studio-shell .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e7eef7 !important;
}

body.admin-studio-shell .admin-form-section-head i {
    display: grid !important;
    place-items: center !important;
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    color: #2563eb !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 12px !important;
    background: #f3f7ff !important;
}

body.admin-studio-shell .admin-form-section-head strong {
    color: #1f2a44 !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-form-section-head small {
    color: #66758c !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.4 !important;
}

body.admin-studio-shell .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

body.admin-studio-shell .admin-field {
    display: grid !important;
    align-content: start !important;
    gap: 7px !important;
    min-width: 0 !important;
    padding: 0 !important;
    color: #35435d !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .admin-field.wide {
    grid-column: 1 / -1 !important;
}

body.admin-studio-shell .admin-field input:not([type="checkbox"]):not([type="radio"]),
body.admin-studio-shell .admin-field select,
body.admin-studio-shell .admin-field textarea {
    min-height: 46px !important;
    padding: 11px 13px !important;
    color: #17223a !important;
    border: 1px solid #cbd8e8 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 850 !important;
    line-height: 1.45 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

body.admin-studio-shell .admin-field input:focus,
body.admin-studio-shell .admin-field textarea:focus,
body.admin-studio-shell .admin-field select:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16) !important;
}

body.admin-studio-shell .admin-field input[type="color"] {
    width: 64px !important;
    min-width: 64px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 4px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
}

body.admin-studio-shell .admin-field textarea {
    min-height: 132px !important;
}

body.admin-studio-shell .admin-field .field-hint,
body.admin-studio-shell .admin-field .field-help {
    color: #718099 !important;
    font-size: 0.78rem !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
}

body.admin-studio-shell .checkbox-field {
    align-content: center !important;
    min-height: 46px !important;
    padding: 12px 13px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 12px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .admin-modal-actions {
    min-height: 66px !important;
    padding: 12px 16px !important;
    border-top: 1px solid #dfe8f4 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 -16px 34px rgba(31, 42, 68, 0.08) !important;
}

body.admin-studio-shell .admin-modal-actions .ghost-button,
body.admin-studio-shell .admin-modal-actions .admin-button {
    min-height: 42px !important;
    border-radius: 12px !important;
    font-size: 0.88rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .icon-picker,
body.admin-studio-shell .link-picker {
    gap: 12px !important;
    padding: 13px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .icon-picker-current {
    min-height: 50px !important;
    border-color: #d8e4f1 !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .icon-picker-current svg {
    color: #2563eb !important;
}

body.admin-studio-shell .icon-picker-search,
.admin-icon-text-search {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: center !important;
    padding: 9px 12px !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .icon-picker-search svg,
.admin-icon-text-search svg {
    width: 18px !important;
    height: 18px !important;
    color: #64748b !important;
}

body.admin-studio-shell .icon-picker-search input,
.admin-icon-text-search input {
    min-height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 0.86rem !important;
}

body.admin-studio-shell .icon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)) !important;
}

body.admin-studio-shell .icon-choice {
    min-height: 78px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .icon-choice:hover,
body.admin-studio-shell .icon-choice.is-selected {
    border-color: #8ab8ff !important;
    background: #eef6ff !important;
}

.admin-icon-text-field {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 96px !important;
    gap: 7px !important;
    align-items: center !important;
    min-width: 0 !important;
}

.admin-icon-text-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    overflow: hidden !important;
    color: #1f4f8f !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 10px !important;
    background: #eff6ff !important;
    cursor: pointer !important;
    font: inherit !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

.admin-icon-text-trigger svg {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 auto !important;
}

.admin-icon-text-trigger span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.admin-icon-text-portal {
    position: fixed !important;
    z-index: 10000 !important;
    display: grid !important;
    gap: 12px !important;
    max-height: min(560px, calc(100dvh - 32px)) !important;
    padding: 14px !important;
    overflow: auto !important;
    border: 1px solid #d5e2f2 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 24px 54px rgba(20, 31, 52, 0.24) !important;
}

.admin-icon-text-portal[hidden] {
    display: none !important;
}

.admin-icon-text-portal-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.admin-icon-text-portal-head strong {
    display: block !important;
    color: #17223a !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
}

.admin-icon-text-portal-head small {
    display: block !important;
    color: #66758c !important;
    font-size: 0.74rem !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
}

.admin-icon-text-portal-head button {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    color: #24324d !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 10px !important;
    background: #f8fbff !important;
    cursor: pointer !important;
}

.admin-icon-text-groups {
    display: grid !important;
    gap: 13px !important;
}

.admin-icon-text-group {
    display: grid !important;
    gap: 8px !important;
}

.admin-icon-text-group > strong {
    color: #536176 !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
}

.admin-icon-text-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)) !important;
    gap: 8px !important;
}

.admin-icon-text-choice {
    display: grid !important;
    justify-items: center !important;
    align-content: center !important;
    gap: 5px !important;
    min-height: 72px !important;
    padding: 8px 6px !important;
    color: #34415a !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    font-size: 0.7rem !important;
    font-weight: 850 !important;
}

.admin-icon-text-choice:hover,
.admin-icon-text-choice.is-selected {
    color: #12366f !important;
    border-color: #93c5fd !important;
    background: #eff6ff !important;
}

.admin-icon-text-choice svg {
    width: 23px !important;
    height: 23px !important;
    color: #2563eb !important;
}

.admin-icon-text-choice span {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-row > .admin-icon-text-field,
body.admin-studio-shell .studio-top-menu-add > .admin-icon-text-field {
    min-width: 0 !important;
    padding: 8px 10px !important;
}

body.admin-studio-shell .studio-top-menu-row > .admin-icon-text-field input,
body.admin-studio-shell .studio-top-menu-add > .admin-icon-text-field input {
    width: 100% !important;
    min-height: 32px !important;
    border-radius: 9px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .studio-top-menu-add > .admin-icon-text-field {
    padding: 0 !important;
}

body.admin-studio-shell .studio-top-menu-add .admin-icon-text-trigger {
    min-height: 34px !important;
}

body.admin-studio-shell .content-list-panel .admin-table td {
    vertical-align: middle !important;
}

body.admin-studio-shell .content-list-panel .admin-table td[data-column="category"],
body.admin-studio-shell .content-list-panel .admin-table td[data-column="slug"],
body.admin-studio-shell .content-list-panel .admin-table td[data-column="button_type"] {
    vertical-align: middle !important;
    line-height: 1.35 !important;
}

/* Top menu manager: group parent menus with their child menus in a compact, readable layout. */
body.admin-studio-shell .studio-top-menu-workspace {
    display: grid !important;
    gap: 18px !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

body.admin-studio-shell .studio-top-menu-create {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto !important;
    gap: 12px !important;
    padding: 16px !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-create > div {
    grid-column: 1 / -1 !important;
    display: grid !important;
    gap: 2px !important;
}

body.admin-studio-shell .studio-top-menu-create > div span,
body.admin-studio-shell .studio-top-menu-level {
    width: fit-content !important;
    padding: 5px 10px !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-create > div strong {
    color: #172033 !important;
    font-size: 1.02rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-create label,
body.admin-studio-shell .studio-top-menu-card label {
    display: grid !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.admin-studio-shell .studio-top-menu-create label span,
body.admin-studio-shell .studio-top-menu-card label span {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-create input,
body.admin-studio-shell .studio-top-menu-create select,
body.admin-studio-shell .studio-top-menu-card input,
body.admin-studio-shell .studio-top-menu-card select {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    border-radius: 11px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .studio-top-menu-create .studio-top-menu-color input,
body.admin-studio-shell .studio-top-menu-card .studio-top-menu-color input {
    width: 58px !important;
    min-width: 58px !important;
    padding: 4px !important;
}

body.admin-studio-shell .studio-top-menu-create > .admin-button {
    align-self: end !important;
    min-height: 38px !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-board,
body.admin-studio-shell .studio-top-menu-children {
    display: grid !important;
    gap: 12px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-top-menu-group {
    display: grid !important;
    gap: 12px !important;
    min-width: 0 !important;
    padding: 14px !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04) !important;
}

body.admin-studio-shell .studio-top-menu-card {
    display: grid !important;
    gap: 12px !important;
    min-width: 0 !important;
    padding: 14px !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-card.is-child {
    margin-left: 28px !important;
    border-left: 4px solid #93c5fd !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-top-menu-card-head,
body.admin-studio-shell .studio-top-menu-orphan-head,
body.admin-studio-shell .studio-top-menu-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

body.admin-studio-shell .studio-top-menu-card-head,
body.admin-studio-shell .studio-top-menu-orphan-head {
    justify-content: space-between !important;
}

body.admin-studio-shell .studio-top-menu-orphan-head strong {
    color: #172033 !important;
    font-size: 0.98rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-orphan-head span {
    color: #64748b !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .studio-top-menu-fields {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-top-menu-children {
    padding-left: 18px !important;
    border-left: 2px dashed #cbd5e1 !important;
}

body.admin-studio-shell .studio-top-menu-children:empty {
    display: none !important;
}

body.admin-studio-shell .studio-top-menu-actions {
    justify-content: flex-end !important;
}

body.admin-studio-shell .studio-top-menu-actions a,
body.admin-studio-shell .studio-top-menu-actions button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 11px !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-actions button[type="submit"]:not(.danger-text) {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

body.admin-studio-shell .studio-top-menu-actions .danger-text {
    border-color: #fecdd3 !important;
    background: #fff1f2 !important;
    color: #e11d48 !important;
}

body.admin-studio-shell .studio-top-menu-actions svg,
body.admin-studio-shell .studio-top-menu-create > .admin-button svg {
    width: 16px !important;
    height: 16px !important;
}

body.admin-studio-shell .studio-top-menu-card .studio-check {
    display: inline-flex !important;
    grid-auto-flow: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    color: #334155 !important;
    font-size: 0.8rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-card .studio-check input {
    width: 18px !important;
    min-height: 18px !important;
}

body.admin-studio-shell .studio-top-menu-card .admin-icon-text-field,
body.admin-studio-shell .studio-top-menu-create .admin-icon-text-field {
    min-width: 0 !important;
    padding: 0 !important;
}

body.admin-studio-shell .studio-top-menu-card .admin-icon-text-trigger,
body.admin-studio-shell .studio-top-menu-create .admin-icon-text-trigger {
    min-height: 38px !important;
    border-radius: 11px !important;
}

@media (max-width: 1200px) {
    body.admin-studio-shell .studio-top-menu-create,
    body.admin-studio-shell .studio-top-menu-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.admin-studio-shell .studio-top-menu-create > .admin-button {
        width: 100% !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .studio-top-menu-create,
    body.admin-studio-shell .studio-top-menu-fields {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .studio-top-menu-card.is-child {
        margin-left: 0 !important;
    }

    body.admin-studio-shell .studio-top-menu-children {
        padding-left: 10px !important;
    }
}

/* Top menu manager final layout: compact table list, edit details in modal. */
body.admin-studio-shell .studio-top-menu-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 18px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-toolbar div {
    display: grid !important;
    gap: 3px !important;
}

body.admin-studio-shell .studio-top-menu-toolbar span {
    color: #e0527b !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-toolbar strong {
    color: #172033 !important;
    font-size: 0.95rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    border: 1px solid #dbe7f5 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
}

body.admin-studio-shell table.studio-top-menu-table {
    display: table !important;
    width: 100% !important;
    min-width: 940px !important;
    overflow: visible !important;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-top-menu-table thead,
body.admin-studio-shell .studio-top-menu-table tbody {
    display: table-header-group !important;
}

body.admin-studio-shell .studio-top-menu-table tbody {
    display: table-row-group !important;
}

body.admin-studio-shell .studio-top-menu-table tr,
body.admin-studio-shell .studio-top-menu-table tr.studio-top-menu-row {
    display: table-row !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .studio-top-menu-table tr.studio-top-menu-row:nth-child(even) {
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-top-menu-table tr.studio-top-menu-row.is-child {
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-table tr.studio-top-menu-row.is-linked-page {
    background: #f6f9ff !important;
}

body.admin-studio-shell .studio-top-menu-table tr.studio-top-menu-row.is-disabled {
    opacity: 0.7 !important;
}

body.admin-studio-shell .studio-top-menu-table th,
body.admin-studio-shell .studio-top-menu-table td {
    display: table-cell !important;
    padding: 11px 12px !important;
    border-bottom: 1px solid #e5edf6 !important;
    color: #334155 !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    vertical-align: middle !important;
}

body.admin-studio-shell .studio-top-menu-table th {
    color: #64748b !important;
    background: #f5f8fc !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    text-align: left !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(1),
body.admin-studio-shell .studio-top-menu-table td:nth-child(1) {
    width: 54px !important;
    text-align: center !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(2),
body.admin-studio-shell .studio-top-menu-table td:nth-child(2) {
    width: 72px !important;
    text-align: center !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(4),
body.admin-studio-shell .studio-top-menu-table td:nth-child(4) {
    width: 120px !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(5),
body.admin-studio-shell .studio-top-menu-table td:nth-child(5) {
    width: 140px !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(7),
body.admin-studio-shell .studio-top-menu-table td:nth-child(7) {
    width: 100px !important;
}

body.admin-studio-shell .studio-top-menu-table th:nth-child(8),
body.admin-studio-shell .studio-top-menu-table td:nth-child(8) {
    width: 220px !important;
    text-align: right !important;
}

body.admin-studio-shell .studio-top-menu-drag .studio-drag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 10px !important;
    background: #eff6ff !important;
    cursor: grab !important;
}

body.admin-studio-shell .studio-top-menu-drag .studio-drag.is-static {
    color: #64748b !important;
    background: #f8fafc !important;
    cursor: default !important;
}

body.admin-studio-shell .studio-top-menu-title-cell {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    color: #172033 !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-title-cell svg {
    width: 16px !important;
    height: 16px !important;
    color: #60a5fa !important;
    flex: 0 0 auto !important;
}

body.admin-studio-shell .studio-top-menu-title-cell span,
body.admin-studio-shell .studio-top-menu-url-cell {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-row.is-child .studio-top-menu-title-cell {
    padding-left: 18px !important;
}

body.admin-studio-shell .studio-top-menu-level-pill,
body.admin-studio-shell .studio-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 26px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-level-pill {
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    background: #eff6ff !important;
}

body.admin-studio-shell .studio-status-pill.is-active {
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
    background: #f0fdf4 !important;
}

body.admin-studio-shell .studio-status-pill.is-muted {
    color: #9f1239 !important;
    border: 1px solid #fecdd3 !important;
    background: #fff1f2 !important;
}

body.admin-studio-shell .studio-top-menu-row-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}

body.admin-studio-shell .studio-inline-delete-form {
    display: inline-flex !important;
    margin: 0 !important;
}

body.admin-studio-shell .studio-top-menu-row-actions .studio-manage-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 10px !important;
    background: #eff6ff !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-row-actions .studio-manage-button svg {
    width: 15px !important;
    height: 15px !important;
}

body.admin-studio-shell .studio-top-menu-row-actions .danger-text {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border: 1px solid #fecdd3 !important;
    border-radius: 10px !important;
    background: #fff1f2 !important;
    color: #e11d48 !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-row-actions .danger-text svg {
    width: 15px !important;
    height: 15px !important;
}

body.admin-studio-shell .studio-top-menu-target-type,
body.admin-studio-shell .studio-top-menu-page-note {
    display: block !important;
}

body.admin-studio-shell .studio-top-menu-page-note {
    margin-top: 3px !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

body.admin-studio-shell .studio-top-menu-empty {
    height: 96px !important;
    color: #64748b !important;
    text-align: center !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-card {
    width: min(860px, calc(100vw - 36px)) !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid label {
    display: grid !important;
    gap: 6px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid label > span {
    color: #64748b !important;
    font-size: 0.76rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid input,
body.admin-studio-shell .studio-top-menu-modal-grid select {
    width: 100% !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid .studio-top-menu-color input {
    width: 72px !important;
    min-width: 72px !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid .studio-top-menu-link-select {
    grid-column: 1 / -1 !important;
    padding: 12px !important;
    border: 1px solid #d8e7ff !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid .studio-top-menu-link-select .field-hint {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid .studio-modal-check {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    align-self: end !important;
    min-height: 44px !important;
}

body.admin-studio-shell .studio-top-menu-modal-grid .studio-modal-check input {
    width: 18px !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .studio-top-menu-toolbar {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    body.admin-studio-shell .studio-top-menu-toolbar .admin-button {
        width: 100% !important;
    }

    body.admin-studio-shell .studio-top-menu-modal-grid {
        grid-template-columns: 1fr !important;
    }
}

body.admin-studio-shell .content-list-panel .admin-table td[data-column="category"] *,
body.admin-studio-shell .content-list-panel .admin-table td[data-column="slug"] *,
body.admin-studio-shell .content-list-panel .admin-table td[data-column="button_type"] * {
    vertical-align: middle !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-form-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-icon-text-field {
        grid-template-columns: minmax(0, 1fr) 88px !important;
    }

    .admin-icon-text-portal {
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
    }
}

/* Compact formal modal + table alignment correction */
body.admin-studio-shell .admin-modal {
    padding: 18px !important;
}

body.admin-studio-shell .admin-modal.is-open {
    place-items: center !important;
}

body.admin-studio-shell .admin-modal-card {
    width: min(800px, calc(100vw - 36px)) !important;
    height: auto !important;
    max-height: calc(100dvh - 36px) !important;
    align-self: center !important;
    justify-self: center !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .admin-modal-head {
    min-height: 0 !important;
    padding: 12px 16px !important;
    align-items: center !important;
    border-radius: 14px 14px 0 0 !important;
}

body.admin-studio-shell .admin-modal-head .panel-kicker {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    min-height: 20px !important;
    padding: 0 8px !important;
    border: 1px solid #f7bdd0 !important;
    border-radius: 999px !important;
    background: #fff7fb !important;
    color: #d64776 !important;
    font-size: 0.62rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.admin-studio-shell .admin-modal-head h2 {
    margin-top: 4px !important;
    color: #17223a !important;
    font-size: clamp(1.08rem, 1.8vw, 1.34rem) !important;
    line-height: 1.14 !important;
}

body.admin-studio-shell .admin-modal-head .icon-button {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .admin-modal-head .icon-button svg {
    width: 19px !important;
    height: 19px !important;
}

body.admin-studio-shell .admin-modal-form {
    display: flex !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #f7faff !important;
}

body.admin-studio-shell .admin-modal-form .admin-form-sections {
    flex: 1 1 auto !important;
    gap: 10px !important;
    padding: 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.admin-studio-shell .admin-form-section {
    padding: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.045) !important;
}

body.admin-studio-shell .admin-form-section-head {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    padding-bottom: 9px !important;
}

body.admin-studio-shell .admin-form-section-head i {
    width: 34px !important;
    height: 34px !important;
    padding: 8px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .admin-form-section-head strong {
    font-size: 0.88rem !important;
    line-height: 1.12 !important;
}

body.admin-studio-shell .admin-form-section-head small {
    font-size: 0.7rem !important;
    line-height: 1.3 !important;
}

body.admin-studio-shell .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
}

body.admin-studio-shell .admin-field {
    gap: 5px !important;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
}

body.admin-studio-shell .admin-field-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 19px !important;
    color: #394762 !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .admin-field-label b {
    color: #e05283 !important;
    font-size: 0.86rem !important;
    line-height: 1 !important;
}

body.admin-studio-shell .admin-field input:not([type="checkbox"]):not([type="radio"]),
body.admin-studio-shell .admin-field select,
body.admin-studio-shell .admin-field textarea {
    min-height: 38px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .admin-field textarea {
    min-height: 96px !important;
}

body.admin-studio-shell .admin-field input[type="file"] {
    min-height: 38px !important;
    padding: 7px 9px !important;
}

body.admin-studio-shell .admin-field input[type="color"] {
    width: 56px !important;
    min-width: 56px !important;
    height: 38px !important;
    min-height: 38px !important;
}

body.admin-studio-shell .admin-field .field-hint,
body.admin-studio-shell .admin-field .field-help {
    font-size: 0.68rem !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .slug-url-control {
    display: grid !important;
    gap: 8px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .slug-url-control select {
    min-height: 38px !important;
}

body.admin-studio-shell .slug-url-row {
    display: grid !important;
    grid-template-columns: auto minmax(120px, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    padding: 6px !important;
    border: 1px solid #dbe6f3 !important;
    border-radius: 12px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .slug-url-row > span {
    padding-left: 4px !important;
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .slug-url-row input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 30px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace !important;
    font-size: 0.76rem !important;
}

body.admin-studio-shell .slug-url-row input[readonly] {
    background: #eef5ff !important;
    color: #1e3a8a !important;
}

body.admin-studio-shell .slug-url-row .ghost-button {
    min-height: 30px !important;
    padding: 0 9px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    white-space: nowrap !important;
}

@media (max-width: 760px) {
    body.admin-studio-shell .slug-url-row {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .slug-url-row > span {
        padding-left: 0 !important;
        white-space: normal !important;
    }
}

body.admin-studio-shell .checkbox-field {
    min-height: 38px !important;
    padding: 9px 10px !important;
}

body.admin-studio-shell .icon-picker,
body.admin-studio-shell .link-picker {
    gap: 9px !important;
    padding: 10px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .icon-picker-current {
    min-height: 40px !important;
    padding: 8px !important;
}

body.admin-studio-shell .icon-picker-current svg {
    width: 18px !important;
    height: 18px !important;
}

body.admin-studio-shell .icon-picker-search,
.admin-icon-text-search {
    padding: 7px 10px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .icon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)) !important;
    gap: 7px !important;
}

body.admin-studio-shell .icon-choice {
    min-height: 60px !important;
    border-radius: 10px !important;
    font-size: 0.64rem !important;
}

body.admin-studio-shell .icon-choice svg {
    width: 20px !important;
    height: 20px !important;
}

body.admin-studio-shell .admin-modal-actions {
    min-height: 52px !important;
    padding: 9px 12px !important;
}

body.admin-studio-shell .admin-modal-actions .ghost-button,
body.admin-studio-shell .admin-modal-actions .admin-button {
    min-height: 36px !important;
    padding: 0 13px !important;
    border-radius: 10px !important;
    font-size: 0.78rem !important;
}

.admin-icon-text-portal {
    max-height: min(460px, calc(100dvh - 24px)) !important;
}

.admin-icon-text-portal[data-placement="top"] {
    box-shadow: 0 -18px 44px rgba(20, 31, 52, 0.2) !important;
}

@media (min-width: 761px) {
    body.admin-studio-shell .content-list-panel .admin-table th,
    body.admin-studio-shell .content-list-panel .admin-table td,
    body.admin-studio-shell .content-list-panel .admin-table td[data-label],
    body.admin-studio-shell .content-list-panel .admin-table td[data-column] {
        display: table-cell !important;
        grid-column: auto !important;
        grid-row: auto !important;
        align-self: auto !important;
        justify-self: auto !important;
        vertical-align: middle !important;
    }

    body.admin-studio-shell .content-list-panel .admin-table td[data-column="category"],
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="slug"],
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="button_type"],
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="icon"] {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        line-height: 1.25 !important;
    }

    body.admin-studio-shell .content-list-panel .admin-table td[data-column="category"] > *,
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="slug"] > *,
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="button_type"] > *,
    body.admin-studio-shell .content-list-panel .admin-table td[data-column="icon"] > * {
        vertical-align: middle !important;
    }

    body.admin-studio-shell .content-list-panel .admin-table .icon-preview-chip,
    body.admin-studio-shell .content-list-panel .admin-table .pill,
    body.admin-studio-shell .content-list-panel .admin-table .parent-menu-label,
    body.admin-studio-shell .content-list-panel .admin-table .color-chip,
    body.admin-studio-shell .content-list-panel .admin-table .file-link {
        display: inline-flex !important;
        align-items: center !important;
        width: fit-content !important;
        max-width: 100% !important;
        vertical-align: middle !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .admin-modal {
        padding: 10px !important;
    }

    body.admin-studio-shell .admin-modal-card {
        width: min(100%, calc(100vw - 20px)) !important;
        max-height: calc(100dvh - 20px) !important;
    }

    body.admin-studio-shell .admin-form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Staff management: grouped workflow above the existing table. */
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench {
    display: grid;
    gap: 12px;
    margin: 14px 0;
    padding: 12px;
    border: 1px solid #d7e3f3;
    border-radius: 16px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%),
        #ffffff;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-flow-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-flow-strip span {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #dce7f5;
    border-radius: 11px;
    background: #fbfdff;
    color: #42516a;
    font-size: 0.7rem;
    font-weight: 850;
    line-height: 1.25;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-flow-strip b {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 950;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters button,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list button {
    appearance: none;
    cursor: pointer;
    border: 1px solid #d8e4f2;
    background: #ffffff;
    color: #334155;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters button {
    display: inline-grid;
    grid-template-columns: 18px minmax(0, auto) auto;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters i {
    width: 17px;
    height: 17px;
    color: #2563eb;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters b,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list b {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #52637b;
    font-size: 0.68rem;
    font-weight: 950;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters button:hover,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list button:hover,
body.admin-studio-shell .content-list-panel.is-entity-staff [data-staff-filter].is-active {
    border-color: #9fc3ff;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

body.admin-studio-shell .content-list-panel.is-entity-staff [data-staff-filter].is-active b {
    background: #dbeafe;
    color: #1d4ed8;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe6f3;
    border-radius: 14px;
    background: #ffffff;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e5edf7;
    background: #f8fbff;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel strong {
    display: block;
    color: #17233c;
    font-size: 0.86rem;
    font-weight: 950;
    line-height: 1.15;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.3;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #d8e4f2;
    border-radius: 10px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header a svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header a i {
    width: 15px;
    height: 15px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list {
    display: grid;
    max-height: 248px;
    overflow: auto;
    padding: 8px;
    gap: 6px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 10px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 850;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .content-toolbelt {
    margin-top: 12px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .admin-table {
    min-width: 1120px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .admin-table td[data-column="name"] {
    min-width: 180px;
    font-weight: 920;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .admin-table td[data-column="position"] {
    min-width: 170px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .admin-table td[data-column="department_name"],
body.admin-studio-shell .content-list-panel.is-entity-staff .admin-table td[data-column="subject_group_name"] {
    min-width: 150px;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-flow-strip,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench {
        padding: 10px;
        border-radius: 14px;
    }

    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-quick-filters button {
        width: 100%;
        grid-template-columns: 18px minmax(0, 1fr) auto;
    }

    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header {
        grid-template-columns: 1fr;
    }

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-group-panel header a {
        justify-content: center;
    }
}

/* Staff management compact dropdown redesign. */
body.admin-studio-shell .content-list-panel [data-content-row][hidden] {
    display: none !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-compact {
    display: grid !important;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: 12px;
    align-items: center;
    margin: 12px 0 !important;
    padding: 12px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy i {
    width: 16px;
    height: 16px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy strong {
    overflow: hidden;
    color: #17233c;
    font-size: 0.94rem;
    font-weight: 950;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-console {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 10px;
    align-items: end;
    min-width: 0;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select {
    display: grid;
    gap: 7px;
    min-width: 0;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select > span {
    color: #334155;
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17233c;
    font-size: 0.78rem;
    letter-spacing: 0;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    align-items: center;
    min-height: 54px;
    overflow: hidden;
    border: 1px solid #bcd5fb;
    border-radius: 16px;
    background:
        linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #eff6ff 100%),
        #ffffff;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell:focus-within {
    border-color: #2563eb;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.14),
        0 14px 28px rgba(37, 99, 235, 0.14);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > i {
    justify-self: center;
    width: 20px;
    height: 20px;
    color: #1d4ed8;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select select {
    width: 100%;
    min-height: 52px;
    padding: 9px 4px;
    border: 0;
    border-radius: 0;
    appearance: none;
    background: transparent;
    color: #17233c;
    font-size: 0.92rem;
    font-weight: 950;
    line-height: 1.3;
    outline: 0;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-right: 7px;
    border-radius: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    pointer-events: none;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b i {
    width: 18px;
    height: 18px;
}

/* Staff filter: compact formal select control. */
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-compact {
    grid-template-columns: minmax(240px, 0.95fr) minmax(300px, 1.05fr) !important;
    gap: 10px !important;
    padding: 10px 12px !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-console {
    grid-template-columns: minmax(280px, 520px) auto !important;
    justify-content: end;
    gap: 9px !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select > span:first-child {
    color: #475569 !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell {
    grid-template-columns: 34px minmax(0, 1fr) 32px !important;
    min-height: 42px !important;
    border-color: #cfdbea !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell:focus-within {
    border-color: #7aa7f8 !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > i {
    width: 16px !important;
    height: 16px !important;
    color: #64748b !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-select select {
    min-height: 40px !important;
    padding: 6px 4px !important;
    color: #17233c !important;
    font-size: 0.8rem !important;
    font-weight: 880 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b {
    width: 24px !important;
    height: 24px !important;
    margin-right: 6px !important;
    border-radius: 8px !important;
    background: #eef2f7 !important;
    color: #475569 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-select-shell > b i {
    width: 15px !important;
    height: 15px !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #d8e4f2;
    border-radius: 11px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions i {
    width: 15px;
    height: 15px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-summary-strip {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 8px;
    border-top: 1px solid #e5edf7;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-summary-strip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #dce7f5;
    border-radius: 999px;
    background: #fbfdff;
    color: #52637b;
    font-size: 0.68rem;
    font-weight: 850;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-summary-strip b {
    color: #1d4ed8;
    font-weight: 950;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-compact,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-console {
        grid-template-columns: 1fr;
    }

    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy strong,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-workbench-copy small {
        white-space: normal;
    }

    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-filter-actions a {
        justify-content: center;
        width: 100%;
    }
}

/* Staff command panel: formal colorful redesign. */
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-panel {
    display: grid !important;
    grid-template-columns: minmax(300px, 0.92fr) minmax(420px, 1.08fr);
    gap: 12px 16px !important;
    align-items: stretch !important;
    margin: 14px 0 !important;
    padding: 14px !important;
    overflow: hidden;
    border: 1px solid #d6e3f4 !important;
    border-left: 5px solid #2563eb !important;
    border-radius: 18px !important;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 0.98) 42%, rgba(240, 253, 250, 0.92) 100%),
        #ffffff !important;
    box-shadow: 0 16px 36px rgba(30, 58, 138, 0.08) !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-icon svg,
body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-icon i {
    width: 23px;
    height: 23px;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-head span:not(.personnel-command-icon) {
    display: block;
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 950;
    line-height: 1.2;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-head strong {
    display: block;
    margin-top: 3px;
    color: #17233c;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1.18;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-head small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter {
    display: grid !important;
    grid-template-columns: minmax(280px, 1fr) auto !important;
    gap: 10px !important;
    align-items: end !important;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-filter-select > span:first-child {
    color: #334155 !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-select-shell {
    grid-template-columns: minmax(0, 1fr) 32px !important;
    min-height: 44px !important;
    border: 1px solid #c7d7ee !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04) !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-select-shell:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-select-shell > i {
    color: #2563eb !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-filter-select select {
    min-height: 42px !important;
    padding-left: 12px !important;
    color: #17233c !important;
    font-size: 0.82rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter .personnel-select-shell > b {
    background: #eff6ff !important;
    color: #2563eb !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions {
    display: grid !important;
    grid-template-columns: repeat(2, max-content);
    gap: 7px !important;
    align-items: end;
    justify-content: end !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions a {
    min-height: 42px !important;
    padding: 0 12px !important;
    border-color: #c7d7ee !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #1d4ed8 !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions a:first-child {
    color: #0f766e !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions a:hover {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px !important;
    padding: 0 !important;
    border: 0 !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats span {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 9px 11px !important;
    border: 1px solid var(--personnel-stat-border, #dce7f5) !important;
    border-left: 4px solid var(--personnel-stat-accent, #2563eb) !important;
    border-radius: 13px !important;
    background: var(--personnel-stat-bg, #ffffff) !important;
    color: #17233c !important;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats small {
    overflow: hidden;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats b {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--personnel-stat-accent, #2563eb) !important;
    font-size: 0.82rem;
    font-weight: 950;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22);
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats .is-total {
    --personnel-stat-accent: #2563eb;
    --personnel-stat-border: #bfdbfe;
    --personnel-stat-bg: #eff6ff;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats .is-active {
    --personnel-stat-accent: #0f766e;
    --personnel-stat-border: #99f6e4;
    --personnel-stat-bg: #f0fdfa;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats .is-featured {
    --personnel-stat-accent: #7c3aed;
    --personnel-stat-border: #ddd6fe;
    --personnel-stat-bg: #f5f3ff;
}

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats .is-warning {
    --personnel-stat-accent: #d97706;
    --personnel-stat-border: #fde68a;
    --personnel-stat-bg: #fffbeb;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-panel,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-filter {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions {
        justify-content: start !important;
    }
}

@media (max-width: 760px) {
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-head,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions,
    body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-stats {
        grid-template-columns: 1fr !important;
    }

body.admin-studio-shell .content-list-panel.is-entity-staff .personnel-command-actions a {
        justify-content: center;
    }
}

body.admin-studio-shell .studio-scope-badge {
    display: inline-flex !important;
    width: fit-content;
    align-items: center;
    margin-top: 4px;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb !important;
    font-size: 0.62rem !important;
    font-weight: 950;
    line-height: 1;
}

body.admin-studio-shell .studio-child-content-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

body.admin-studio-shell .studio-child-content-button svg,
body.admin-studio-shell .studio-child-content-button i {
    width: 16px;
    height: 16px;
}

body.admin-studio-shell .studio-child-content-button:hover {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1e40af;
}

body.admin-studio-shell .content-scope-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 14px 0 18px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-left: 5px solid #3b82f6;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 247, 251, 0.96));
    color: #24304a;
}

body.admin-studio-shell .content-scope-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #ffffff;
}

body.admin-studio-shell .content-scope-icon svg,
body.admin-studio-shell .content-scope-icon i {
    width: 20px;
    height: 20px;
}

body.admin-studio-shell .content-scope-banner strong {
    display: block;
    color: #1f2a46;
    font-size: 0.94rem;
    font-weight: 950;
}

body.admin-studio-shell .content-scope-banner p {
    margin: 2px 0 0;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.45;
}

body.admin-studio-shell .content-scope-banner b {
    color: #be3d69;
    font-weight: 950;
}

body.admin-studio-shell .content-scope-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

body.admin-studio-shell .content-scope-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #dbe6f3;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
}

body.admin-studio-shell .content-scope-actions a:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

@media (max-width: 760px) {
    body.admin-studio-shell .content-scope-banner {
        grid-template-columns: auto 1fr;
    }

    body.admin-studio-shell .content-scope-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    body.admin-studio-shell .content-scope-actions a {
        flex: 1 1 140px;
        justify-content: center;
    }
}

/* Compact homepage column manager: keep the table readable and move details into a modal. */
body.admin-studio-shell .studio-block-list.is-compact-list {
    overflow-x: auto !important;
}

body.admin-studio-shell .studio-block-list.is-compact-list .studio-block-table-head.is-compact,
body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact {
    grid-template-columns: 52px minmax(170px, 0.95fr) minmax(280px, 1.6fr) 118px minmax(250px, 0.9fr) !important;
    min-width: 920px !important;
}

body.admin-studio-shell .studio-block-list.is-compact-list .studio-block-table-head.is-compact span:nth-child(3),
body.admin-studio-shell .studio-block-list.is-compact-list .studio-block-table-head.is-compact span:nth-child(4),
body.admin-studio-shell .studio-block-list.is-compact-list .studio-block-table-head.is-compact span:nth-child(5) {
    text-align: left !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact {
    min-height: 62px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact .studio-drag {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 9px 10px !important;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact .studio-block-title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 9px 10px !important;
}

body.admin-studio-shell .studio-block-summary {
    grid-column: 3 !important;
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 9px 10px !important;
}

body.admin-studio-shell .studio-block-summary strong {
    overflow: hidden;
    color: #24304a;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-block-summary small {
    overflow: hidden;
    color: #74839a;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.admin-studio-shell .studio-block-status {
    grid-column: 4 !important;
    display: grid;
    justify-items: start;
    gap: 3px;
    padding: 9px 10px !important;
}

body.admin-studio-shell .studio-block-status span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 950;
    line-height: 1;
}

body.admin-studio-shell .studio-block-status span.is-on {
    background: #dcfce7;
    color: #166534;
}

body.admin-studio-shell .studio-block-status span.is-off {
    background: #f1f5f9;
    color: #64748b;
}

body.admin-studio-shell .studio-block-status small {
    color: #738096;
    font-size: 0.64rem;
    font-weight: 850;
}

body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact .studio-row-actions {
    grid-column: 5 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
}

body.admin-studio-shell .studio-block-list.is-compact-list .studio-child-content-button {
    min-height: 32px;
    max-width: 160px;
    padding: 0 10px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.admin-studio-shell .studio-manage-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px !important;
    padding: 0 12px !important;
    border: 1px solid #dbe6f3;
    border-radius: 10px;
    background: #ffffff;
    color: #24304a;
    font-size: 0.72rem !important;
    font-weight: 950;
    white-space: nowrap;
}

body.admin-studio-shell .studio-manage-button svg,
body.admin-studio-shell .studio-manage-button i {
    width: 14px;
    height: 14px;
}

body.admin-studio-shell .studio-manage-button:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

body.admin-studio-shell .studio-custom-block-editor {
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}

body.admin-studio-shell .studio-custom-block-editor > header {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.admin-studio-shell .studio-custom-block-editor > header > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 14px;
    background: #1d4ed8;
}

body.admin-studio-shell .studio-custom-block-editor > header strong {
    display: block;
    color: #172033;
    font-size: 1rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-custom-block-editor > header small {
    color: #64748b;
    font-weight: 800;
}

body.admin-studio-shell .studio-custom-block-grid,
body.admin-studio-shell .studio-custom-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

body.admin-studio-shell .studio-custom-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.admin-studio-shell .studio-custom-rich-field,
body.admin-studio-shell .studio-custom-block-editor > label {
    display: grid;
    gap: 8px;
}

body.admin-studio-shell .studio-custom-image-preview,
body.admin-studio-shell .studio-custom-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.admin-studio-shell .studio-custom-image-preview img,
body.admin-studio-shell .studio-custom-gallery-preview img {
    width: 96px;
    height: 64px;
    object-fit: cover;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
}

body.admin-studio-shell .studio-custom-image-preview label,
body.admin-studio-shell .studio-custom-gallery-preview label {
    display: inline-grid;
    gap: 6px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

@media (max-width: 900px) {
    body.admin-studio-shell .studio-custom-block-grid,
    body.admin-studio-shell .studio-custom-columns {
        grid-template-columns: 1fr;
    }
}

body.admin-studio-shell .studio-block-modal[hidden] {
    display: none !important;
}

body.admin-studio-shell .studio-block-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
}

body.admin-studio-shell .studio-block-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(5px);
}

body.admin-studio-shell .studio-block-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100dvh - 38px);
    overflow: hidden;
    border: 1px solid #dbe6f3;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(31, 42, 70, 0.24);
}

body.admin-studio-shell .studio-block-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e5edf6;
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.92), rgba(239, 246, 255, 0.94));
}

body.admin-studio-shell .studio-block-modal-head span {
    display: block;
    color: #be3d69;
    font-size: 0.72rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-block-modal-head h3 {
    margin: 2px 0 3px;
    color: #1f2a46;
    font-size: clamp(1.15rem, 1.4vw, 1.45rem);
    font-weight: 950;
    line-height: 1.12;
}

body.admin-studio-shell .studio-block-modal-head p {
    margin: 0;
    color: #66758c;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.4;
}

body.admin-studio-shell .studio-block-modal-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    padding: 18px 20px;
    overflow-y: auto;
}

body.admin-studio-shell .studio-block-modal-form label {
    display: grid;
    gap: 6px;
    color: #43516a;
    font-size: 0.76rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-block-modal-form input,
body.admin-studio-shell .studio-block-modal-form select,
body.admin-studio-shell .studio-block-modal-form textarea {
    width: 100%;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #dbe6f3;
    border-radius: 11px;
    background: #f8fafc;
    color: #24304a;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
}

body.admin-studio-shell .studio-block-modal-form textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.55;
}

body.admin-studio-shell .studio-block-modal-form input:focus,
body.admin-studio-shell .studio-block-modal-form select:focus,
body.admin-studio-shell .studio-block-modal-form textarea:focus {
    outline: 3px solid rgba(96, 165, 250, 0.22);
    border-color: #93c5fd;
    background: #ffffff;
}

body.admin-studio-shell .studio-modal-check {
    align-self: end;
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: start !important;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #ffd1df;
    border-radius: 12px;
    background: #fff7fb;
}

body.admin-studio-shell .studio-block-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 20px;
    border-top: 1px solid #e5edf6;
    background: #f8fafc;
}

body.admin-studio-shell .studio-modal-left-actions,
body.admin-studio-shell .studio-modal-right-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

body.admin-studio-shell .studio-block-modal-actions form {
    margin: 0;
}

body.admin-studio-shell .studio-block-modal-actions button,
body.admin-studio-shell .studio-block-modal-actions a {
    min-height: 34px !important;
    padding: 0 12px !important;
    border: 1px solid #dbe6f3;
    border-radius: 10px;
    background: #ffffff;
    color: #24304a;
    font-size: 0.76rem !important;
    font-weight: 950;
    text-decoration: none;
}

body.admin-studio-shell .studio-block-modal-actions button.primary {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #ffffff;
}

body.admin-studio-shell .studio-block-modal-actions .danger-text {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be3d69;
}

@media (max-width: 900px) {
    body.admin-studio-shell .studio-block-list.is-compact-list .studio-block-table-head.is-compact,
    body.admin-studio-shell .studio-editor-panel:has(.studio-block-list.is-compact-list) .studio-block-row.is-compact {
        min-width: 780px !important;
        grid-template-columns: 48px minmax(145px, 0.9fr) minmax(230px, 1.35fr) 105px minmax(210px, 0.85fr) !important;
    }
}

@media (max-width: 720px) {
    body.admin-studio-shell .studio-block-modal {
        padding: 10px;
        align-items: stretch;
    }

    body.admin-studio-shell .studio-block-modal-card {
        width: 100%;
        max-height: calc(100dvh - 20px);
    }

    body.admin-studio-shell .studio-block-modal-form {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    body.admin-studio-shell .studio-block-modal-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 12px 14px;
    }

    body.admin-studio-shell .studio-modal-left-actions,
    body.admin-studio-shell .studio-modal-right-actions {
        justify-content: stretch;
    }

    body.admin-studio-shell .studio-block-modal-actions button,
    body.admin-studio-shell .studio-block-modal-actions a,
    body.admin-studio-shell .studio-block-modal-actions form {
        flex: 1 1 auto;
    }
}

/* Freeform center-column content modal: wide, scrollable, and closer to the page-content editor. */
body.admin-studio-shell .studio-custom-content-modal {
    padding: 24px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-card {
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    border-radius: 22px;
    background: #ffffff;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-head {
    align-items: center;
    min-height: 122px;
    padding: 24px 28px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-head h3 {
    font-size: clamp(1.55rem, 2vw, 2.15rem);
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-head p {
    max-width: 760px;
    font-size: 0.9rem;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 16px 18px;
    padding: 24px 28px 28px;
    background: #ffffff;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

body.admin-studio-shell .studio-custom-content-modal [data-custom-block-visible][hidden],
body.admin-studio-shell .studio-custom-content-modal [data-layout-column-editor][hidden],
body.admin-studio-shell .studio-custom-content-modal [data-layout-column-card][hidden],
body.admin-studio-shell .studio-custom-content-modal [data-layout-column-mode][hidden],
body.admin-studio-shell .studio-custom-content-modal .layout-column-mode[hidden] {
    display: none !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form > label,
body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form > .studio-check {
    min-width: 0;
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form > label:nth-of-type(3),
body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form > .studio-modal-check {
    align-self: end;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-title-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
    gap: 16px;
    align-items: end;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-title-row > label {
    min-width: 0;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-title-row .studio-modal-check {
    min-height: 54px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor {
    grid-column: 1 / -1;
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background:
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor > header {
    padding-bottom: 2px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor > header > span {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor > header strong {
    font-size: 1.12rem;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid > label,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-field,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-rich-field,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor > label {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: #43516a;
    font-size: 0.78rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-field b {
    color: #43516a;
    font-size: 0.78rem;
    font-weight: 950;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-rich-field,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-columns,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-editor > label,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid:has(.studio-custom-field) {
    grid-column: 1 / -1;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor {
    width: 100%;
    gap: 16px !important;
    padding: 18px !important;
    border: 1px solid #d7e6fb !important;
    border-radius: 18px !important;
    background:
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08) !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-editor-head {
    align-items: center !important;
    gap: 14px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #e4edf9 !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-editor-head strong {
    color: #17213a !important;
    font-size: 1.02rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-editor-head small {
    color: #66758f !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.55 !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-editor-head > span {
    border: 1px solid #bfdbfe !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 14px !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-card {
    gap: 12px !important;
    padding: 14px !important;
    min-width: 0;
    overflow: visible;
    border: 1px solid #dbeafe !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06) !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-card[hidden],
body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-mode[hidden] {
    display: none !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-card header {
    grid-template-columns: minmax(92px, 1fr) minmax(140px, 190px);
    gap: 10px !important;
    align-items: center !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #edf3fb !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-card header span {
    color: #1f2b45 !important;
    font-size: 0.96rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-card header select {
    min-height: 40px !important;
    border-radius: 12px !important;
    background-color: #f8fbff !important;
    font-size: 0.84rem !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-section {
    gap: 10px !important;
    padding: 12px !important;
    border: 1px solid #e5eef9 !important;
    border-radius: 14px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-section label,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-section label span {
    min-width: 0;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-controls {
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 13px !important;
    background: #f7faff !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-controls--triple {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 132px) minmax(82px, 104px) !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor textarea {
    min-height: 112px !important;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid:has(.studio-custom-field) {
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-editor {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar button,
body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar select {
    min-height: 40px;
    border-radius: 12px;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar select {
    flex: 1 1 150px;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-color-picker {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    background: #ffffff;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-color-picker input {
    width: 38px;
    min-height: 28px;
    padding: 3px;
}

body.admin-studio-shell .studio-custom-content-modal .rich-text-surface {
    min-height: 220px;
    max-height: 360px;
    overflow-y: auto;
    padding: 16px 18px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-image-preview,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
    padding: 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    background: #ffffff;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-image-preview img,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-gallery-preview img {
    display: block;
    width: 100%;
    height: 86px;
    border-radius: 12px;
    object-fit: cover;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-image-preview.image-remove-card,
body.admin-studio-shell .studio-custom-content-modal .studio-custom-gallery-preview .image-remove-card,
body.admin-studio-shell .studio-custom-content-modal .layout-column-gallery-preview .image-remove-card {
    position: relative;
    overflow: hidden;
    display: block;
    min-width: 0;
    padding: 0;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
    box-shadow: 0 10px 22px rgba(31, 48, 78, 0.08);
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-image-preview.image-remove-card {
    width: min(220px, 100%);
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-image-preview.image-remove-card img {
    height: 120px;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-gallery-preview .image-remove-card img,
body.admin-studio-shell .studio-custom-content-modal .layout-column-gallery-preview .image-remove-card img {
    border: 0;
    border-radius: 0;
}

body.admin-studio-shell .studio-custom-content-modal .studio-custom-gallery-preview .image-remove-card input[type="checkbox"],
body.admin-studio-shell .studio-custom-content-modal .layout-column-gallery-preview .image-remove-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-panel {
    max-width: 100%;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
    max-height: 360px;
    padding: 0;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    padding: 0;
    border-radius: 14px;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-thumb {
    width: 100%;
    height: 94px;
    border-radius: 0;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-meta {
    padding: 8px 10px 10px;
}

body.admin-studio-shell .studio-custom-content-modal .selected-upload-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(67, 80, 106, 0.18);
}

body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-actions {
    flex: 0 0 auto;
    padding: 16px 28px;
    background: #f8fafc;
}

@media (max-width: 980px) {
    body.admin-studio-shell .studio-custom-content-modal {
        padding: 12px;
        align-items: stretch;
    }

    body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-card {
        width: 100%;
        max-height: calc(100dvh - 24px);
    }

    body.admin-studio-shell .studio-custom-content-modal .studio-block-modal-form,
    body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid,
    body.admin-studio-shell .studio-custom-content-modal .studio-custom-block-grid:has(.studio-custom-field),
    body.admin-studio-shell .studio-custom-content-modal .studio-custom-title-row,
    body.admin-studio-shell .studio-custom-content-modal .studio-custom-layout-editor .layout-column-grid,
    body.admin-studio-shell .studio-custom-content-modal .studio-custom-columns {
        grid-template-columns: 1fr;
    }
}

/* Top menu modal refinement: keep fields and actions in a single clean dialog flow. */
body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-card {
    width: min(760px, calc(100vw - 36px)) !important;
    max-height: calc(100dvh - 40px) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-head {
    align-items: center !important;
    min-height: 0 !important;
    padding: 18px 20px !important;
    background:
        linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(239, 246, 255, 0.98)) !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-head h3 {
    margin-top: 1px !important;
    font-size: clamp(1.25rem, 1.8vw, 1.65rem) !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-head p {
    max-width: 620px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    max-height: min(58dvh, 520px) !important;
    overflow-y: auto !important;
    padding: 18px 20px 20px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid label {
    display: grid !important;
    gap: 7px !important;
    min-width: 0 !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid label > span {
    color: #66758c !important;
    font-size: 0.78rem !important;
    font-weight: 950 !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid input,
body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid select {
    min-height: 42px !important;
    border-radius: 13px !important;
    background: #f8fafc !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid .studio-top-menu-link-select {
    grid-column: 1 / -1 !important;
    padding: 12px !important;
    border: 1px solid #d8e7ff !important;
    border-radius: 16px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid .studio-top-menu-link-select .field-hint {
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-color input {
    width: 92px !important;
    min-width: 92px !important;
    padding: 5px !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-modal-check {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    align-self: end !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-modal-check input {
    width: 20px !important;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions {
    display: flex !important;
    grid-column: 1 / -1 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 14px 20px !important;
    border-top: 1px solid #e5edf6 !important;
    background: #f8fafc !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-modal-left-actions,
body.admin-studio-shell .studio-top-menu-modal .studio-modal-right-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-modal-right-actions {
    justify-content: flex-end !important;
    margin-left: auto !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions button,
body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border-radius: 13px !important;
    font-size: 0.86rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions button.primary {
    min-width: 112px !important;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.18) !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions .danger-text {
    color: #be3d69 !important;
    border-color: #ffc4d5 !important;
    background: #fff5f8 !important;
}

body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions svg {
    width: 18px !important;
    height: 18px !important;
}

@media (max-width: 720px) {
    body.admin-studio-shell .studio-top-menu-modal .studio-top-menu-modal-grid {
        grid-template-columns: 1fr !important;
        max-height: none !important;
        padding: 14px !important;
    }

    body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions {
        align-items: stretch !important;
        flex-direction: column !important;
        padding: 12px 14px !important;
    }

    body.admin-studio-shell .studio-top-menu-modal .studio-modal-left-actions,
    body.admin-studio-shell .studio-top-menu-modal .studio-modal-right-actions {
        justify-content: stretch !important;
        margin-left: 0 !important;
    }

    body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions button,
    body.admin-studio-shell .studio-top-menu-modal .studio-block-modal-actions a {
        flex: 1 1 100% !important;
    }
}
/* Page content manager additions */
.content-child-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 14px;
    color: #2563eb;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}

.content-child-button:hover {
    color: #1d4ed8;
    border-color: #93c5fd;
    background: #dbeafe;
}

.content-child-button svg {
    width: 18px;
    height: 18px;
}

.page-builder-context-banner {
    align-items: center;
    border-left-color: #3b82f6;
    background:
        radial-gradient(circle at 96% 0%, rgba(59, 130, 246, 0.12), transparent 32%),
        linear-gradient(135deg, #f8fbff, #fff8fb);
}

.readonly-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #d7e3f3;
    border-radius: 14px;
    background: #f8fbff;
}

.readonly-choice > svg,
.readonly-choice > i {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: #3b82f6;
}

.readonly-choice span {
    display: grid;
    gap: 2px;
}

.readonly-choice strong {
    color: #24304a;
    font-size: 0.98rem;
    line-height: 1.3;
}

.readonly-choice small {
    color: #65728a;
    font-size: 0.8rem;
    font-weight: 700;
}

.multi-link-editor {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dce8f6;
    border-radius: 16px;
    background: #f8fbff;
}

.multi-link-options {
    display: grid;
    grid-template-columns: minmax(220px, 360px);
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(191, 213, 239, 0.9);
    border-radius: 14px;
    background: rgba(248, 251, 255, 0.92);
}

.multi-link-options label {
    display: grid;
    gap: 6px;
    margin: 0;
}

.multi-link-options span {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
}

.multi-link-options select {
    width: 100%;
}

.multi-link-list {
    display: grid;
    gap: 10px;
}

.multi-link-row {
    display: grid;
    grid-template-columns: minmax(170px, 0.75fr) minmax(150px, 0.6fr) minmax(240px, 1fr) 44px;
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid #dce8f6;
    border-radius: 14px;
    background: #fff;
}

.multi-link-row label {
    display: grid;
    gap: 6px;
}

.multi-link-row label[hidden] {
    display: none;
}

.multi-link-row label span {
    color: #65728a;
    font-size: 0.78rem;
    font-weight: 800;
}

.multi-link-row input,
.multi-link-row select {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.94rem;
}

.multi-link-row .icon-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
}

@media (max-width: 780px) {
    .multi-link-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .multi-link-row .icon-button {
        justify-self: end;
    }
}

.rich-text-editor {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid #dce8f6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(54, 82, 138, 0.07);
}

.rich-text-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e4edf8;
    background: linear-gradient(135deg, #f8fbff, #fff6fb);
}

.rich-text-toolbar button,
.rich-text-toolbar select {
    min-height: 34px;
    border: 1px solid #d8e5f5;
    border-radius: 10px;
    background: #fff;
    color: #24304a;
    font-size: 0.82rem;
    font-weight: 800;
}

.rich-text-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 0;
    cursor: pointer;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar select:hover {
    border-color: #9bcff4;
    background: #f4faff;
}

.rich-text-toolbar svg {
    width: 16px;
    height: 16px;
}

.rich-text-toolbar select {
    width: auto;
    padding: 0 28px 0 10px;
}

.rich-text-divider {
    width: 1px;
    height: 24px;
    background: #dce8f6;
}

.rich-text-surface {
    min-height: 180px;
    padding: 18px;
    color: #24304a;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.8;
    outline: none;
}

.rich-text-surface:empty::before {
    content: "พิมพ์ข้อความของหน้านี้...";
    color: #9aa8bc;
}

.rich-text-surface:focus {
    background: #fbfdff;
}

.rich-text-size-small {
    font-size: 0.9em;
}

.rich-text-size-large {
    font-size: 1.18em;
}

.rich-text-size-xlarge {
    font-size: 1.38em;
}

@media (max-width: 780px) {
    .rich-text-toolbar {
        gap: 5px;
        padding: 8px;
    }

    .rich-text-toolbar button {
        width: 34px;
    }

    .rich-text-toolbar select {
        flex: 1 1 135px;
    }

    .rich-text-surface {
        min-height: 160px;
        padding: 14px;
        font-size: 0.94rem;
    }
}

/* Definitive page content modal polish. Keep this at EOF so older admin-studio rules cannot override it. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(1180px, calc(100vw - 40px)) !important;
    max-height: calc(100dvh - 28px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid #cfdbea !important;
    border-radius: 20px !important;
    background: #f6f9fd !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 0 !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid #dde8f5 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin: 8px 0 0 !important;
    color: #17233c !important;
    font-size: clamp(1.45rem, 2.25vw, 2rem) !important;
    line-height: 1.12 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    display: inline-flex !important;
    min-height: 26px !important;
    padding: 4px 11px !important;
    color: #be3d69 !important;
    font-size: 0.82rem !important;
    border: 1px solid #ffc5d8 !important;
    border-radius: 999px !important;
    background: #fff7fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-form,
.content-editor-modal .admin-modal-form {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #eef4fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    display: grid !important;
    align-content: start !important;
    gap: 14px !important;
    overflow-y: auto !important;
    padding: 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section {
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #d8e4f1 !important;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 12px 26px rgba(23, 35, 60, 0.055) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n + 2),
.content-editor-modal .admin-form-section:nth-child(3n + 2) {
    border-left-color: #14b8a6 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:nth-child(3n),
.content-editor-modal .admin-form-section:nth-child(3n) {
    border-left-color: #e05283 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    border-bottom: 1px solid #e5edf7 !important;
    background: linear-gradient(180deg, #fff, #f8fbff) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 42px !important;
    height: 42px !important;
    padding: 10px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong {
    color: #17233c !important;
    font-size: 1rem !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small {
    color: #66758c !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 16px 18px 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid .wide,
.content-editor-modal .admin-form-grid .wide {
    grid-column: 1 / -1 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field,
.content-editor-modal .admin-field {
    display: grid !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .admin-field[hidden],
.content-editor-modal .admin-field[hidden],
body.admin-studio-shell .content-editor-modal [hidden],
.content-editor-modal [hidden] {
    display: none !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 44px !important;
    padding: 10px 12px !important;
    color: #17233c !important;
    font-size: 0.94rem !important;
    line-height: 1.45 !important;
    border: 1px solid #cfdbea !important;
    border-radius: 12px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-editor,
.content-editor-modal .rich-text-editor {
    overflow: hidden !important;
    border: 1px solid #cfdbea !important;
    border-radius: 14px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px !important;
    border-bottom: 1px solid #dfe8f4 !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    width: auto !important;
    min-width: 42px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    color: #17233c !important;
    font-size: 0.9rem !important;
    border: 1px solid #cfdbea !important;
    border-radius: 11px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-toolbar select {
    min-width: 150px !important;
    padding-right: 32px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-color-picker {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker input,
.content-editor-modal .rich-text-color-picker input {
    width: 26px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 220px !important;
    padding: 18px 20px !important;
    color: #24304a;
    font-size: 1rem !important;
    font-weight: 650 !important;
    line-height: 1.75 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions,
.content-editor-modal .admin-modal-actions {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    min-height: 72px !important;
    margin: 0 !important;
    padding: 14px 18px !important;
    border-top: 1px solid #dbe7f4 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions .ghost-button,
body.admin-studio-shell .content-editor-modal .admin-modal-actions .admin-button,
.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 46px !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
}

@media (max-width: 820px) {
    body.admin-studio-shell .admin-modal-card.content-editor-modal,
    .admin-modal-card.content-editor-modal {
        width: calc(100vw - 18px) !important;
        max-height: calc(100dvh - 18px) !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-form-grid,
    .content-editor-modal .admin-form-grid {
        grid-template-columns: 1fr !important;
        padding: 14px !important;
    }
}

/* Restore the page content editor to the spacious modal layout requested by the user. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(1280px, calc(100vw - 16px)) !important;
    max-height: calc(100dvh - 16px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
    border: 1px solid rgba(202, 218, 236, 0.98) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 30px 80px rgba(30, 41, 59, 0.28) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    align-items: flex-start !important;
    min-height: 116px !important;
    padding: 0 28px 24px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background: linear-gradient(135deg, rgba(255, 246, 251, 0.95), rgba(241, 249, 255, 0.95)) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    min-height: 30px !important;
    padding: 4px 14px !important;
    color: #d64278 !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
    border: 2px solid #ffbdd4 !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin: 4px 0 0 !important;
    color: #17233c !important;
    font-size: clamp(2.15rem, 4.2vw, 3.25rem) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 66px !important;
    height: 66px !important;
    margin-top: 18px !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.96) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-form,
.content-editor-modal .admin-modal-form {
    grid-template-rows: minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #eef4fb !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    gap: 18px !important;
    overflow-y: auto !important;
    padding: 10px 22px 22px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section {
    display: block !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(41, 55, 84, 0.05) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:first-child,
.content-editor-modal .admin-form-section:first-child {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-section-head,
.content-editor-modal .admin-form-section:first-child .admin-form-section-head {
    display: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 16px !important;
    padding: 20px 22px !important;
    border-bottom: 1px solid #dfe9f5 !important;
    background: linear-gradient(180deg, #fff, #fbfdff) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 58px !important;
    height: 58px !important;
    padding: 15px !important;
    border-radius: 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small {
    font-size: 0.98rem !important;
    font-weight: 750 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    padding: 20px 22px 22px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-grid,
.content-editor-modal .admin-form-section:first-child .admin-form-grid {
    padding: 0 0 4px !important;
    border-top: 1px solid #dfe9f5 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid .wide,
.content-editor-modal .admin-form-grid .wide {
    grid-column: 1 / -1 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field,
.content-editor-modal .admin-field {
    gap: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .admin-field[hidden],
.content-editor-modal .admin-field[hidden],
body.admin-studio-shell .content-editor-modal [hidden],
.content-editor-modal [hidden] {
    display: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-field > label,
body.admin-studio-shell .content-editor-modal .admin-field > div > label,
.content-editor-modal .admin-field > label,
.content-editor-modal .admin-field > div > label {
    color: #4c5b72 !important;
    font-size: 1.08rem !important;
    font-weight: 850 !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 58px !important;
    padding: 13px 16px !important;
    color: #17233c !important;
    font-size: 1.08rem !important;
    font-weight: 750 !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 16px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-editor,
.content-editor-modal .rich-text-editor {
    overflow: hidden !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 22px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    gap: 10px !important;
    padding: 16px 18px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background: linear-gradient(135deg, #fff, #fff6fb) !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    min-width: 58px !important;
    min-height: 58px !important;
    padding: 0 16px !important;
    color: #17233c !important;
    font-size: 1rem !important;
    font-weight: 850 !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 14px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-toolbar select {
    min-width: 168px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker input,
.content-editor-modal .rich-text-color-picker input {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 360px !important;
    padding: 32px !important;
    color: #24304a !important;
    font-size: 1.42rem !important;
    font-weight: 780 !important;
    line-height: 1.68 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .field-hint,
.content-editor-modal .field-hint {
    color: #6f7f96 !important;
    font-size: 0.95rem !important;
    font-weight: 750 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions,
.content-editor-modal .admin-modal-actions {
    position: sticky !important;
    bottom: 0 !important;
    justify-content: flex-end !important;
    gap: 18px !important;
    min-height: 92px !important;
    padding: 20px 22px !important;
    border-top: 1px solid #d8e4f1 !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 -12px 24px rgba(30, 41, 59, 0.08) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions .ghost-button,
body.admin-studio-shell .content-editor-modal .admin-modal-actions .admin-button,
.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 58px !important;
    padding: 0 24px !important;
    border-radius: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 850 !important;
}

@media (max-width: 820px) {
    body.admin-studio-shell .content-editor-modal .admin-modal-head,
    .content-editor-modal .admin-modal-head,
    body.admin-studio-shell .content-editor-modal .admin-form-sections,
    .content-editor-modal .admin-form-sections,
    body.admin-studio-shell .content-editor-modal .admin-modal-actions,
    .content-editor-modal .admin-modal-actions {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-form-grid,
    .content-editor-modal .admin-form-grid {
        grid-template-columns: 1fr !important;
    }

    body.admin-studio-shell .content-editor-modal .rich-text-surface,
    .content-editor-modal .rich-text-surface {
        min-height: 260px !important;
        font-size: 1.08rem !important;
    }
}

/* Final compact reset for the page content editor modal. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(980px, calc(100vw - 32px)) !important;
    max-height: calc(100dvh - 32px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    flex: 0 0 auto !important;
    align-items: center !important;
    min-height: auto !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid #dbe7f4 !important;
    background: linear-gradient(135deg, #fff8fb, #f7fbff) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    min-height: 24px !important;
    padding: 3px 10px !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    border-width: 1px !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin: 4px 0 0 !important;
    font-size: clamp(1.35rem, 1.9vw, 1.75rem) !important;
    line-height: 1.08 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 48px !important;
    height: 48px !important;
    margin-top: 0 !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-form,
.content-editor-modal .admin-modal-form {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: #f3f7fc !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: block !important;
    overflow-y: auto !important;
    padding: 16px !important;
    background: #f3f7fc !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section,
body.admin-studio-shell .content-editor-modal .admin-form-section:first-child,
.content-editor-modal .admin-form-section:first-child {
    position: static !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 1px solid #d8e4f1 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(30, 41, 59, 0.05) !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-section-head,
.content-editor-modal .admin-form-section:first-child .admin-form-section-head,
body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 14px 16px !important;
    border-bottom: 1px solid #e2ebf6 !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 44px !important;
    height: 44px !important;
    padding: 11px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong {
    font-size: 1.08rem !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small {
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid,
body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-grid,
.content-editor-modal .admin-form-section:first-child .admin-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 16px !important;
    border-top: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field,
.content-editor-modal .admin-field {
    position: static !important;
    display: grid !important;
    gap: 8px !important;
    min-height: 0 !important;
}

body.admin-studio-shell .content-editor-modal .admin-field[hidden],
.content-editor-modal .admin-field[hidden],
body.admin-studio-shell .content-editor-modal [hidden],
.content-editor-modal [hidden] {
    display: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-field > label,
body.admin-studio-shell .content-editor-modal .admin-field > div > label,
.content-editor-modal .admin-field > label,
.content-editor-modal .admin-field > div > label {
    font-size: 0.94rem !important;
    font-weight: 800 !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 44px !important;
    padding: 9px 12px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-editor,
.content-editor-modal .rich-text-editor {
    position: static !important;
    overflow: hidden !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 16px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px !important;
    border-bottom: 1px solid #dce8f6 !important;
    background: #fff8fb !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    min-width: 42px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 0.9rem !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-toolbar select {
    min-width: 145px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-color-picker input,
.content-editor-modal .rich-text-color-picker input {
    width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    position: static !important;
    min-height: 220px !important;
    max-height: none !important;
    padding: 18px !important;
    overflow: visible !important;
    font-size: 1rem !important;
    font-weight: 650 !important;
    line-height: 1.7 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-editor,
.content-editor-modal .layout-column-editor {
    position: static !important;
    margin-top: 12px !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions,
.content-editor-modal .admin-modal-actions {
    flex: 0 0 auto !important;
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    min-height: 68px !important;
    padding: 12px 16px !important;
    border-top: 1px solid #d8e4f1 !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-actions .ghost-button,
body.admin-studio-shell .content-editor-modal .admin-modal-actions .admin-button,
.content-editor-modal .admin-modal-actions .ghost-button,
.content-editor-modal .admin-modal-actions .admin-button {
    min-height: 44px !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
}

@media (max-width: 820px) {
    body.admin-studio-shell .admin-modal-card.content-editor-modal,
    .admin-modal-card.content-editor-modal {
        width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
    }

    body.admin-studio-shell .content-editor-modal .admin-form-grid,
    .content-editor-modal .admin-form-grid,
    body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-grid,
    .content-editor-modal .admin-form-section:first-child .admin-form-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Compact layout-column editor refinements. Keep this scoped to the content modal. */
body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    font-size: clamp(1.14rem, 1.35vw, 1.42rem) !important;
    line-height: 1.16 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 42px !important;
    height: 42px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head strong,
.content-editor-modal .admin-form-section-head strong,
body.admin-studio-shell .content-editor-modal .layout-column-editor-head strong,
.content-editor-modal .layout-column-editor-head strong {
    font-size: 0.98rem !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head small,
.content-editor-modal .admin-form-section-head small,
body.admin-studio-shell .content-editor-modal .layout-column-editor-head small,
.content-editor-modal .layout-column-editor-head small {
    font-size: 0.8rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-editor,
.content-editor-modal .layout-column-editor {
    gap: 12px !important;
    padding: 12px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-editor-head,
.content-editor-modal .layout-column-editor-head {
    gap: 10px !important;
    padding-bottom: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-editor-head > span,
.content-editor-modal .layout-column-editor-head > span {
    padding: 6px 10px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-grid,
.content-editor-modal .layout-column-grid {
    gap: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card,
.content-editor-modal .layout-column-card {
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card header span,
.content-editor-modal .layout-column-card header span {
    font-size: 0.92rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card header select,
.content-editor-modal .layout-column-card header select {
    min-width: 104px !important;
    min-height: 36px !important;
    padding: 6px 28px 6px 10px !important;
    font-size: 0.84rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls,
.content-editor-modal .layout-column-controls {
    gap: 8px !important;
    padding: 8px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
.content-editor-modal .layout-column-controls--triple {
    grid-template-columns: minmax(0, 1.2fr) minmax(96px, 118px) minmax(78px, 98px) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check,
.content-editor-modal .layout-column-check {
    min-height: 34px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check span,
.content-editor-modal .layout-column-check span,
body.admin-studio-shell .content-editor-modal .layout-column-align > span,
.content-editor-modal .layout-column-align > span,
body.admin-studio-shell .content-editor-modal .layout-column-color > span,
.content-editor-modal .layout-column-color > span,
body.admin-studio-shell .content-editor-modal .layout-column-card label > span,
.content-editor-modal .layout-column-card label > span {
    font-size: 0.78rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-align select,
.content-editor-modal .layout-column-align select,
body.admin-studio-shell .content-editor-modal .layout-column-card input[type="text"],
body.admin-studio-shell .content-editor-modal .layout-column-card textarea,
.content-editor-modal .layout-column-card input[type="text"],
.content-editor-modal .layout-column-card textarea {
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 0.86rem !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-color,
.content-editor-modal .layout-column-color {
    display: grid !important;
    gap: 6px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-color input[type="color"],
.content-editor-modal .layout-column-color input[type="color"] {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 5px !important;
    border: 1px solid #cbd9eb !important;
    border-radius: 10px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-color--inline,
.content-editor-modal .layout-column-color--inline {
    max-width: 150px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-image-upload,
.content-editor-modal .layout-column-image-upload {
    display: grid !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-crop-preview,
.content-editor-modal .layout-column-crop-preview {
    min-height: 84px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    min-height: 36px !important;
    font-size: 0.82rem !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 180px !important;
    padding: 14px !important;
    font-size: 0.92rem !important;
    line-height: 1.62 !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
    .content-editor-modal .layout-column-controls--triple {
        grid-template-columns: 1fr !important;
    }
}

/* Final compact pass for the page-builder content modal. */
body.admin-studio-shell .admin-modal-card.content-editor-modal,
.admin-modal-card.content-editor-modal {
    width: min(1040px, calc(100vw - 28px)) !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head,
.content-editor-modal .admin-modal-head {
    padding: 14px 18px !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .panel-kicker,
.content-editor-modal .admin-modal-head .panel-kicker {
    min-height: 22px !important;
    padding: 2px 9px !important;
    font-size: 0.74rem !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head h2,
.content-editor-modal .admin-modal-head h2 {
    margin-top: 2px !important;
    font-size: clamp(1.02rem, 1.15vw, 1.26rem) !important;
    line-height: 1.18 !important;
}

body.admin-studio-shell .content-editor-modal .admin-modal-head .icon-button,
.content-editor-modal .admin-modal-head .icon-button {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-sections,
.content-editor-modal .admin-form-sections {
    padding: 12px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section,
.content-editor-modal .admin-form-section,
body.admin-studio-shell .content-editor-modal .admin-form-section:first-child,
.content-editor-modal .admin-form-section:first-child {
    margin-bottom: 10px !important;
    border-radius: 14px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head,
.content-editor-modal .admin-form-section-head,
body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-section-head,
.content-editor-modal .admin-form-section:first-child .admin-form-section-head {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 11px 13px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-section-head i,
body.admin-studio-shell .content-editor-modal .admin-form-section-head > svg,
.content-editor-modal .admin-form-section-head i,
.content-editor-modal .admin-form-section-head > svg {
    width: 38px !important;
    height: 38px !important;
    padding: 9px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .admin-form-grid,
.content-editor-modal .admin-form-grid,
body.admin-studio-shell .content-editor-modal .admin-form-section:first-child .admin-form-grid,
.content-editor-modal .admin-form-section:first-child .admin-form-grid {
    gap: 10px !important;
    padding: 12px !important;
}

body.admin-studio-shell .content-editor-modal .admin-field > label,
body.admin-studio-shell .content-editor-modal .admin-field > div > label,
.content-editor-modal .admin-field > label,
.content-editor-modal .admin-field > div > label {
    font-size: 0.82rem !important;
}

body.admin-studio-shell .content-editor-modal input[type="text"],
body.admin-studio-shell .content-editor-modal input[type="number"],
body.admin-studio-shell .content-editor-modal input[type="url"],
body.admin-studio-shell .content-editor-modal input[type="file"],
body.admin-studio-shell .content-editor-modal textarea,
body.admin-studio-shell .content-editor-modal select,
.content-editor-modal input[type="text"],
.content-editor-modal input[type="number"],
.content-editor-modal input[type="url"],
.content-editor-modal input[type="file"],
.content-editor-modal textarea,
.content-editor-modal select {
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
    border-radius: 11px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar,
.content-editor-modal .rich-text-toolbar {
    gap: 6px !important;
    padding: 8px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-toolbar button,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select,
body.admin-studio-shell .content-editor-modal .rich-text-color-picker,
.content-editor-modal .rich-text-toolbar button,
.content-editor-modal .rich-text-toolbar select,
.content-editor-modal .rich-text-color-picker {
    min-width: 36px !important;
    min-height: 34px !important;
    padding: 0 8px !important;
    font-size: 0.78rem !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .content-editor-modal .rich-text-surface,
.content-editor-modal .rich-text-surface {
    min-height: 150px !important;
    padding: 12px !important;
    font-size: 0.86rem !important;
    line-height: 1.58 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card,
.content-editor-modal .layout-column-card {
    padding: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls,
.content-editor-modal .layout-column-controls {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 132px) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
.content-editor-modal .layout-column-controls--triple {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 116px) minmax(76px, 96px) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-mode textarea,
.content-editor-modal .layout-column-mode textarea {
    min-height: 92px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-crop-preview,
.content-editor-modal .layout-column-crop-preview {
    min-height: 70px !important;
    background-size: cover !important;
    background-position: center !important;
}

body.admin-studio-shell .content-editor-modal .field-hint,
.content-editor-modal .field-hint {
    font-size: 0.76rem !important;
    line-height: 1.35 !important;
}

@media (max-width: 1180px) {
    body.admin-studio-shell .content-editor-modal .layout-column-controls,
    body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
    .content-editor-modal .layout-column-controls,
    .content-editor-modal .layout-column-controls--triple {
        grid-template-columns: 1fr !important;
    }
}

/* Layout column editor: final density and overlap fixes. */
body.admin-studio-shell .content-editor-modal .layout-column-grid,
.content-editor-modal .layout-column-grid {
    align-items: start !important;
    gap: 12px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card,
.content-editor-modal .layout-column-card {
    min-width: 0 !important;
    gap: 8px !important;
    padding: 10px !important;
    overflow: visible !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card header,
.content-editor-modal .layout-column-card header {
    display: grid !important;
    grid-template-columns: minmax(88px, 1fr) minmax(142px, 190px) !important;
    align-items: center !important;
    gap: 8px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card header span,
.content-editor-modal .layout-column-card header span {
    font-size: 0.86rem !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card header select,
.content-editor-modal .layout-column-card header select {
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    min-height: 34px !important;
    font-size: 0.76rem !important;
    padding: 5px 26px 5px 9px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card > label,
.content-editor-modal .layout-column-card > label,
body.admin-studio-shell .content-editor-modal .layout-column-mode label,
.content-editor-modal .layout-column-mode label {
    gap: 5px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card label > span,
.content-editor-modal .layout-column-card label > span {
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-card input[type="text"],
body.admin-studio-shell .content-editor-modal .layout-column-card input[type="url"],
body.admin-studio-shell .content-editor-modal .layout-column-card select,
body.admin-studio-shell .content-editor-modal .layout-column-card textarea,
.content-editor-modal .layout-column-card input[type="text"],
.content-editor-modal .layout-column-card input[type="url"],
.content-editor-modal .layout-column-card select,
.content-editor-modal .layout-column-card textarea {
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    font-size: 0.78rem !important;
    line-height: 1.32 !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls,
body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
.content-editor-modal .layout-column-controls,
.content-editor-modal .layout-column-controls--triple {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 7px !important;
    align-items: stretch !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check,
body.admin-studio-shell .content-editor-modal .layout-column-align,
body.admin-studio-shell .content-editor-modal .layout-column-color,
.content-editor-modal .layout-column-check,
.content-editor-modal .layout-column-align,
.content-editor-modal .layout-column-color {
    min-width: 0 !important;
    min-height: 0 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check,
.content-editor-modal .layout-column-check {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 8px !important;
    border-radius: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check input[type="checkbox"],
.content-editor-modal .layout-column-check input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check span,
.content-editor-modal .layout-column-check span,
body.admin-studio-shell .content-editor-modal .layout-column-align > span,
.content-editor-modal .layout-column-align > span,
body.admin-studio-shell .content-editor-modal .layout-column-color > span,
.content-editor-modal .layout-column-color > span {
    font-size: 0.7rem !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-align select,
.content-editor-modal .layout-column-align select {
    width: 100% !important;
    height: 34px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-color input[type="color"],
.content-editor-modal .layout-column-color input[type="color"] {
    height: 34px !important;
    min-height: 34px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-color--inline,
.content-editor-modal .layout-column-color--inline {
    max-width: none !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-image-upload,
.content-editor-modal .layout-column-image-upload,
body.admin-studio-shell .content-editor-modal .layout-column-mode,
.content-editor-modal .layout-column-mode {
    gap: 7px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-mode textarea,
.content-editor-modal .layout-column-mode textarea {
    min-height: 78px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-image-preview,
.content-editor-modal .layout-column-image-preview {
    padding: 8px !important;
    border-radius: 12px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-image-preview img,
.content-editor-modal .layout-column-image-preview img {
    max-height: 120px !important;
    object-fit: cover !important;
}

@media (max-width: 1320px) {
    body.admin-studio-shell .content-editor-modal .layout-column-card header,
    .content-editor-modal .layout-column-card header {
        grid-template-columns: 1fr !important;
    }
}

/* Readable stacked controls for layout columns. */
body.admin-studio-shell .content-editor-modal .layout-heading-field,
.content-editor-modal .layout-heading-field {
    display: grid !important;
    gap: 10px !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-text,
.content-editor-modal .layout-heading-text {
    display: grid !important;
    gap: 6px !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-text > span,
.content-editor-modal .layout-heading-text > span {
    color: #5f6f88 !important;
    font-size: 0.78rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-text b,
.content-editor-modal .layout-heading-text b {
    color: #e84f83 !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-text textarea,
.content-editor-modal .layout-heading-text textarea {
    min-height: 62px !important;
    resize: vertical !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-controls,
.content-editor-modal .layout-heading-controls,
body.admin-studio-shell .content-editor-modal .layout-column-controls,
body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
.content-editor-modal .layout-column-controls,
.content-editor-modal .layout-column-controls--triple {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 8px !important;
    border: 1px solid #dbe8f7 !important;
    border-radius: 12px !important;
    background: #f7fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-controls,
.content-editor-modal .layout-heading-controls {
    background: #fff8fb !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-controls,
.content-editor-modal .layout-heading-controls {
    grid-template-columns: minmax(220px, 0.85fr) minmax(220px, 1fr) minmax(220px, 1fr) !important;
    align-items: stretch !important;
}

body.admin-studio-shell .content-editor-modal .layout-heading-controls .layout-column-check,
.content-editor-modal .layout-heading-controls .layout-column-check {
    align-content: center !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-controls--triple,
.content-editor-modal .layout-column-controls--triple {
    background: #f8fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-mode[data-layout-column-mode="image"] .layout-column-controls,
.content-editor-modal .layout-column-mode[data-layout-column-mode="image"] .layout-column-controls {
    background: #f7fffb !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-mode[data-layout-column-mode="link"] .layout-column-controls,
.content-editor-modal .layout-column-mode[data-layout-column-mode="link"] .layout-column-controls {
    background: #fffaf1 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check,
body.admin-studio-shell .content-editor-modal .layout-column-align,
body.admin-studio-shell .content-editor-modal .layout-column-color,
.content-editor-modal .layout-column-check,
.content-editor-modal .layout-column-align,
.content-editor-modal .layout-column-color {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    border: 1px solid #d9e6f5 !important;
    border-radius: 10px !important;
    background: #fff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-check,
.content-editor-modal .layout-column-check {
    grid-template-columns: 22px minmax(0, 1fr) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-align,
body.admin-studio-shell .content-editor-modal .layout-column-color,
.content-editor-modal .layout-column-align,
.content-editor-modal .layout-column-color {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: 5px !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-align select,
body.admin-studio-shell .content-editor-modal .layout-column-color input[type="color"],
.content-editor-modal .layout-column-align select,
.content-editor-modal .layout-column-color input[type="color"] {
    width: 100% !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section,
.content-editor-modal .layout-column-section {
    display: grid !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid #d9e6f5 !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section > label,
.content-editor-modal .layout-column-section > label {
    margin: 0 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-controls,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-controls--triple,
.content-editor-modal .layout-column-section .layout-column-controls,
.content-editor-modal .layout-column-section .layout-column-controls--triple {
    margin: 0 !important;
    border-color: rgba(158, 184, 215, 0.58) !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-check,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-align,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-color,
.content-editor-modal .layout-column-section .layout-column-check,
.content-editor-modal .layout-column-section .layout-column-align,
.content-editor-modal .layout-column-section .layout-column-color {
    background: rgba(255, 255, 255, 0.86) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--title,
.content-editor-modal .layout-column-section--title {
    border-color: #d8e6ff !important;
    background: #f7faff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text,
.content-editor-modal .layout-column-section--text {
    border-color: #dce8ff !important;
    background: #f5f8ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image,
.content-editor-modal .layout-column-section--image {
    border-color: #cdeee4 !important;
    background: #f3fffb !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--caption,
.content-editor-modal .layout-column-section--caption {
    border-color: #f3e3b5 !important;
    background: #fffaf0 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--link,
.content-editor-modal .layout-column-section--link {
    border-color: #f5d9c4 !important;
    background: #fff8f2 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--html,
.content-editor-modal .layout-column-section--html {
    border-color: #e2dcff !important;
    background: #fbf8ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--title .layout-column-controls,
.content-editor-modal .layout-column-section--title .layout-column-controls {
    border-color: #cfe1ff !important;
    background: #eef6ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--title .layout-column-check,
.content-editor-modal .layout-column-section--title .layout-column-check {
    border-color: #f1d9a7 !important;
    background: #fff8e8 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--title .layout-column-align,
.content-editor-modal .layout-column-section--title .layout-column-align {
    border-color: #bfe8d8 !important;
    background: #eefcf7 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text .layout-column-controls,
.content-editor-modal .layout-column-section--text .layout-column-controls {
    border-color: #d9d1ff !important;
    background: #f7f4ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text .layout-column-check,
.content-editor-modal .layout-column-section--text .layout-column-check {
    border-color: #bfe9d6 !important;
    background: #effaf5 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text .layout-column-align,
.content-editor-modal .layout-column-section--text .layout-column-align {
    border-color: #f0d8a9 !important;
    background: #fff8e7 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text .layout-column-color,
.content-editor-modal .layout-column-section--text .layout-column-color {
    border-color: #cddcff !important;
    background: #f3f7ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image .layout-column-controls,
.content-editor-modal .layout-column-section--image .layout-column-controls {
    border-color: #bfe9dc !important;
    background: #f0fff9 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image .layout-column-align:first-child,
.content-editor-modal .layout-column-section--image .layout-column-align:first-child {
    border-color: #f2d8a8 !important;
    background: #fff8e8 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image .layout-column-align:last-child,
.content-editor-modal .layout-column-section--image .layout-column-align:last-child {
    border-color: #cbdcff !important;
    background: #f4f8ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image .layout-column-image-upload,
.content-editor-modal .layout-column-section--image .layout-column-image-upload {
    border-color: #f1dec2 !important;
    background: #fffaf3 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image .layout-column-image-preview,
.content-editor-modal .layout-column-section--image .layout-column-image-preview {
    border-color: #cfe0ff !important;
    background: #f7fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--caption .layout-column-controls,
.content-editor-modal .layout-column-section--caption .layout-column-controls {
    border-color: #efd9bf !important;
    background: #fff7f1 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--caption .layout-column-check,
.content-editor-modal .layout-column-section--caption .layout-column-check {
    border-color: #c9e7ff !important;
    background: #f2fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--caption .layout-column-color,
.content-editor-modal .layout-column-section--caption .layout-column-color {
    border-color: #f1cfe2 !important;
    background: #fff6fb !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--link .layout-column-controls,
.content-editor-modal .layout-column-section--link .layout-column-controls {
    border-color: #f1d5bd !important;
    background: #fff7ef !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--link .layout-column-check,
.content-editor-modal .layout-column-section--link .layout-column-check {
    border-color: #c9e7ff !important;
    background: #f4fbff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--link .layout-column-align,
.content-editor-modal .layout-column-section--link .layout-column-align {
    border-color: #ded4ff !important;
    background: #f8f5ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--html textarea,
.content-editor-modal .layout-column-section--html textarea {
    border-color: #d9d0ff !important;
    background: #fffaff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-controls,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-controls--triple,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-check,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-align,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-color,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-image-upload,
body.admin-studio-shell .content-editor-modal .layout-column-section .layout-column-image-preview,
body.admin-studio-shell .content-editor-modal .layout-column-section textarea,
.content-editor-modal .layout-column-section .layout-column-controls,
.content-editor-modal .layout-column-section .layout-column-controls--triple,
.content-editor-modal .layout-column-section .layout-column-check,
.content-editor-modal .layout-column-section .layout-column-align,
.content-editor-modal .layout-column-section .layout-column-color,
.content-editor-modal .layout-column-section .layout-column-image-upload,
.content-editor-modal .layout-column-section .layout-column-image-preview,
.content-editor-modal .layout-column-section textarea {
    border-color: rgba(148, 170, 198, 0.38) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--title,
.content-editor-modal .layout-column-section--title {
    border-color: #b9d7ff !important;
    background: #edf6ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--text,
.content-editor-modal .layout-column-section--text {
    border-color: #d6c8ff !important;
    background: #f6f1ff !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--image,
.content-editor-modal .layout-column-section--image {
    border-color: #b9e7d2 !important;
    background: #effbf5 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--caption,
.content-editor-modal .layout-column-section--caption {
    border-color: #efd59a !important;
    background: #fff7e6 !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--link,
.content-editor-modal .layout-column-section--link {
    border-color: #f4c5b6 !important;
    background: #fff1ec !important;
}

body.admin-studio-shell .content-editor-modal .layout-column-section--html,
.content-editor-modal .layout-column-section--html {
    border-color: #cfd7ff !important;
    background: #f3f5ff !important;
}

.rich-link-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(8px);
}

.rich-link-dialog {
    width: min(560px, 100%);
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.rich-link-dialog header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #fff7fb, #f8fbff);
}

.rich-link-dialog header span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 6px;
    padding: 5px 12px;
    border: 1px solid #ffcfe1;
    border-radius: 999px;
    color: #d94673;
    font-size: 0.86rem;
    font-weight: 800;
}

.rich-link-dialog h3 {
    margin: 0;
    color: #17233f;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.15;
}

.rich-link-dialog p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

.rich-link-dialog-body {
    display: grid;
    gap: 14px;
    padding: 22px 24px;
}

.rich-link-dialog-body label {
    display: grid;
    gap: 8px;
}

.rich-link-dialog-body label > span {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 800;
}

.rich-link-dialog-body select,
.rich-link-dialog-body input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #17233f;
    font: inherit;
    font-weight: 800;
}

.rich-link-dialog-body [hidden] {
    display: none !important;
}

.rich-link-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

@media (max-width: 640px) {
    .rich-link-dialog-backdrop {
        padding: 14px;
    }

    .rich-link-dialog header,
    .rich-link-dialog-body,
    .rich-link-dialog footer {
        padding-inline: 18px;
    }

    .rich-link-dialog footer {
        flex-direction: column-reverse;
    }

    .rich-link-dialog footer .ghost-button,
    .rich-link-dialog footer .admin-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 980px) {
    body.admin-studio-shell .content-editor-modal .layout-heading-controls,
    .content-editor-modal .layout-heading-controls {
        grid-template-columns: 1fr !important;
    }
}

/* Freeform block layout editor: final scoped polish after the shared content modal rules. */
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor {
    display: grid !important;
    gap: 18px !important;
    padding: 20px !important;
    border: 1px solid #cfe0f6 !important;
    border-radius: 20px !important;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%) !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
    gap: 18px !important;
    align-items: start !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card {
    display: grid !important;
    gap: 16px !important;
    min-width: 0 !important;
    padding: 18px !important;
    border: 1px solid #cfe0f6 !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 18px 42px rgba(31, 48, 78, 0.08) !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) !important;
    gap: 14px !important;
    align-items: center !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #dbe8f7 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card header span {
    color: #17233f !important;
    font-size: 1.05rem !important;
    font-weight: 950 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card header select {
    width: 100% !important;
    min-height: 46px !important;
    height: auto !important;
    padding: 9px 36px 9px 12px !important;
    border: 1px solid #c7d8ee !important;
    border-radius: 13px !important;
    background-color: #f8fbff !important;
    color: #17233f !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section {
    display: grid !important;
    gap: 14px !important;
    padding: 16px !important;
    border: 1px solid #d9e6f5 !important;
    border-left-width: 5px !important;
    border-radius: 16px !important;
    background: #fbfdff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--title {
    border-left-color: #2563eb !important;
    background: #f2f7ff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--text {
    border-left-color: #7c3aed !important;
    background: #f8f5ff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--image {
    border-left-color: #059669 !important;
    background: #f2fcf7 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--slideshow {
    border-left-color: #0ea5e9 !important;
    background: #f0f9ff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--caption {
    border-left-color: #d97706 !important;
    background: #fff8eb !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--link {
    border-left-color: #e85d75 !important;
    background: #fff5f7 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section--html {
    border-left-color: #4f46e5 !important;
    background: #f5f7ff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section > label,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-mode label {
    display: grid !important;
    gap: 8px !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-section label > span,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-align > span,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-color > span {
    display: block !important;
    min-width: 0 !important;
    color: #53627b !important;
    font-size: 0.82rem !important;
    font-weight: 950 !important;
    line-height: 1.35 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-controls,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-controls--triple {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 12px !important;
    align-items: stretch !important;
    padding: 12px !important;
    border: 1px solid rgba(173, 194, 220, 0.75) !important;
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.78) !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-check,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-align,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-color {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 7px !important;
    align-content: start !important;
    padding: 12px !important;
    border: 1px solid rgba(190, 207, 229, 0.88) !important;
    border-radius: 13px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-check {
    grid-template-columns: 26px minmax(0, 1fr) !important;
    align-items: center !important;
    min-height: 56px !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-check input[type="hidden"] {
    display: none !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-check input[type="checkbox"] {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    accent-color: #2563eb !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-check span {
    display: block !important;
    color: #34435f !important;
    font-size: 0.9rem !important;
    font-weight: 950 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor input[type="text"],
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor input[type="url"],
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor select,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor textarea {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd9ec !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    color: #17233f !important;
    font-size: 0.9rem !important;
    font-weight: 850 !important;
    line-height: 1.45 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor textarea {
    min-height: 112px !important;
    resize: vertical !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor input[type="color"] {
    width: 100% !important;
    min-height: 46px !important;
    padding: 5px !important;
    border-radius: 13px !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-mode {
    display: grid !important;
    gap: 14px !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-mode[hidden],
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card[hidden],
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal [data-custom-block-visible][hidden] {
    display: none !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .admin-url-picker {
    display: grid !important;
    gap: 12px !important;
    padding: 14px !important;
    border: 1px solid #f0bfd0 !important;
    border-left: 5px solid #e85d75 !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #fff7fa 0%, #ffffff 100%) !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .admin-url-picker-grid {
    display: grid !important;
    grid-template-columns: minmax(150px, 0.76fr) minmax(0, 1.24fr) !important;
    gap: 12px !important;
    align-items: end !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .admin-url-picker label {
    display: grid !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin: 0 !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .admin-url-picker [hidden] {
    display: none !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-image-upload,
body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-image-preview {
    display: grid !important;
    gap: 10px !important;
    padding: 12px !important;
    border: 1px dashed #a7d9c4 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
}

body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-image-preview img {
    width: 100% !important;
    max-height: 180px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
}

@media (max-width: 980px) {
    body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-grid,
    body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-card header,
    body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-controls,
    body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .layout-column-controls--triple,
    body.admin-studio-shell .studio-custom-content-modal.content-editor-modal .studio-custom-layout-editor .admin-url-picker-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ------------------------------------------------------------------ *
 * Rich text editor: active toolbar buttons, compact numeric size &
 * line-spacing selects, and their small labels. Kept at EOF so it
 * overrides the duplicated .content-editor-modal rules earlier.
 * ------------------------------------------------------------------ */
.rich-text-tool-label {
    align-self: center;
    color: #6b7a93;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
    padding: 0 2px 0 4px;
}

.rich-text-toolbar select[data-rich-size],
.rich-text-toolbar select[data-rich-line-height],
.content-editor-modal .rich-text-toolbar select[data-rich-size],
.content-editor-modal .rich-text-toolbar select[data-rich-line-height],
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select[data-rich-size],
body.admin-studio-shell .content-editor-modal .rich-text-toolbar select[data-rich-line-height],
body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar select[data-rich-size],
body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar select[data-rich-line-height] {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 72px !important;
    padding-right: 26px !important;
}

.rich-text-toolbar button.is-active,
.content-editor-modal .rich-text-toolbar button.is-active,
body.admin-studio-shell .content-editor-modal .rich-text-toolbar button.is-active,
body.admin-studio-shell .studio-custom-content-modal .rich-text-toolbar button.is-active {
    color: #ffffff !important;
    background: #2f6bff !important;
    border-color: #2f6bff !important;
    box-shadow: 0 6px 14px rgba(47, 107, 255, 0.26) !important;
}

/* Editor body text is normal weight so it matches the public page (.page-builder-block-text
   is also 400). Bold is applied with the B button as <strong>/<b>; those and headings stay
   bold. Overrides the many duplicated .rich-text-surface weight rules above. */
.rich-text-surface,
.content-editor-modal .rich-text-surface,
body.admin-studio-shell .content-editor-modal .rich-text-surface,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface {
    font-weight: 400 !important;
    line-height: 1.6 !important;
}

/* Paragraph/line spacing inside the editor MUST match the public page: every <p>/<div>
   (the browser makes a <div> per Enter) gets the same gap, and stray top margins are
   removed. Without this the editor looks tighter than the published result. */
.rich-text-surface p,
.rich-text-surface div,
.rich-text-surface blockquote,
.content-editor-modal .rich-text-surface p,
.content-editor-modal .rich-text-surface div,
.content-editor-modal .rich-text-surface blockquote,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface p,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface div,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface blockquote {
    margin-top: 0 !important;
    margin-bottom: 0.25rem !important;
}

.rich-text-surface > :last-child,
.content-editor-modal .rich-text-surface > :last-child,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface > :last-child {
    margin-bottom: 0 !important;
}

.rich-text-surface strong,
.rich-text-surface b,
.rich-text-surface h2,
.rich-text-surface h3,
.rich-text-surface h4,
.content-editor-modal .rich-text-surface strong,
.content-editor-modal .rich-text-surface b,
.content-editor-modal .rich-text-surface h2,
.content-editor-modal .rich-text-surface h3,
.content-editor-modal .rich-text-surface h4,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface strong,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface b,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface h2,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface h3,
body.admin-studio-shell .studio-custom-content-modal .rich-text-surface h4 {
    font-weight: 700 !important;
}

/* การ์ดรีเซ็ตยอดเข้าชม (จัดการ Footer) */
body.admin-studio-shell .studio-visits-card {
    margin-top: 18px;
    align-content: start;
}

body.admin-studio-shell .studio-visits-summary {
    margin: 0;
    color: var(--muted, #697386);
    font-size: 0.98rem;
}

body.admin-studio-shell .studio-visits-summary strong {
    color: var(--ink, #263044);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

body.admin-studio-shell .studio-visits-dot {
    margin: 0 6px;
    opacity: 0.45;
}

body.admin-studio-shell .studio-visits-card form {
    margin: 0;
}

body.admin-studio-shell .studio-visits-card .admin-button {
    justify-self: start;
}

/* ===== หน้าเปลี่ยนรหัสผ่านผู้ดูแลระบบ (admin/account.php) ===== */
.account-panel {
    display: grid;
    gap: 22px;
    max-width: 1080px;
}

.account-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 26px 28px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 55%, #9333ea 100%);
    box-shadow: 0 20px 44px rgba(76, 29, 149, 0.28);
}

.account-hero-mark {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    flex: 0 0 auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.account-hero-mark svg {
    width: 30px;
    height: 30px;
}

.account-hero .panel-kicker {
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.14em;
}

.account-hero h2 {
    margin: 4px 0 6px;
    color: #fff;
    font-size: 1.6rem;
}

.account-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    max-width: 48ch;
}

.account-hero-user {
    display: grid;
    gap: 6px;
    margin-left: auto;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
}

.account-hero-user span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.account-hero-user svg {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}

.account-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-form {
    display: grid;
    gap: 20px;
    padding: 26px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--admin-line, #e6eaf2);
    box-shadow: 0 16px 38px rgba(38, 48, 68, 0.06);
}

.account-field {
    display: grid;
    gap: 8px;
}

.account-field > label {
    font-weight: 700;
    color: var(--ink, #263044);
    font-size: 0.96rem;
}

.password-input {
    position: relative;
    display: block;
}

.password-input input {
    width: 100%;
    box-sizing: border-box;
    height: 50px;
    padding: 0 52px 0 16px;
    border-radius: 13px;
    border: 1.5px solid var(--admin-line, #dbe2ee);
    background: #f8fafc;
    font-size: 1rem;
    color: var(--ink, #263044);
    letter-spacing: 0.02em;
    transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.password-input input:focus {
    outline: none;
    border-color: #6d28d9;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.14);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #7c8aa3;
    cursor: pointer;
    transition: background 0.16s, color 0.16s;
}

.password-toggle:hover {
    background: #eef1f7;
    color: #6d28d9;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.password-strength-track {
    position: relative;
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: #eceff4;
    overflow: hidden;
}

.password-strength-track i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: 999px;
    background: #ef4444;
    transition: width 0.24s ease, background 0.24s ease;
}

.password-strength[data-level="1"] .password-strength-track i { width: 20%; background: #ef4444; }
.password-strength[data-level="2"] .password-strength-track i { width: 40%; background: #f59e0b; }
.password-strength[data-level="3"] .password-strength-track i { width: 60%; background: #f59e0b; }
.password-strength[data-level="4"] .password-strength-track i { width: 80%; background: #22c55e; }
.password-strength[data-level="5"] .password-strength-track i { width: 100%; background: #16a34a; }

.password-strength-label {
    font-size: 0.82rem;
    color: var(--muted, #697386);
    white-space: nowrap;
}

.password-match {
    margin: 2px 0 0;
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.password-match::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.password-match.is-ok { color: #16a34a; }
.password-match.is-bad { color: #dc2626; }

.account-actions {
    margin-top: 4px;
}

.account-form .admin-button.primary {
    width: 100%;
    justify-content: center;
    height: 50px;
}

.account-rules {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8f6ff 0%, #f2f6ff 100%);
    border: 1px solid #e7e2fb;
}

.account-rules-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    color: var(--ink, #263044);
}

.account-rules-title svg {
    width: 18px;
    height: 18px;
    color: #6d28d9;
}

.password-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.password-checklist li {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 0.94rem;
    color: var(--muted, #697386);
    transition: color 0.16s;
}

.password-checklist li::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    background: #fff;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.password-checklist li.is-ok {
    color: #15803d;
    font-weight: 600;
}

.password-checklist li.is-ok::before {
    border-color: #16a34a;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.account-rules-hint {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--muted, #697386);
    line-height: 1.5;
}

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

    .account-hero-user {
        margin-left: 0;
    }
}
