:root {
    --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f7f9fb;
    --surface: #ffffff;
    --surface-muted: #f2f4f6;
    --surface-raised: #ffffff;
    --text: #191c1e;
    --muted: #5b6472;
    --border: #e2e8f0;
    --primary: #001a41;
    --primary-soft: #dae2ff;
    --gold: #b8860b;
    --green: #0f8a4b;
    --red: #c0263d;
    --blue: #1d4ed8;
    --accent: #1d4ed8;
    --purple: #7c3aed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
    --bg: #0d1118;
    --surface: #141a24;
    --surface-muted: #1b2430;
    --surface-raised: #101722;
    --text: #eff4fb;
    --muted: #a9b4c2;
    --border: #2a3545;
    --primary: #b1c5ff;
    --primary-soft: #13213f;
    --gold: #e9c349;
    --green: #71dc8e;
    --red: #fb7185;
    --blue: #8fb2ff;
    --accent: #8fb2ff;
    --purple: #c4b5fd;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.ui-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.container {
    width: min(1520px, calc(100% - 64px));
    margin-inline: auto;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    width: 100%;
    background: #172a62;
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(0, 26, 65, .14);
}

.site-nav-spacer {
    height: 82px;
}

.nav.is-scrolled {
    box-shadow: 0 18px 50px rgba(0, 18, 46, .24);
}

.nav-inner {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 280px;
}

.brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.brand strong {
    color: #ffffff;
    font-size: clamp(18px, 1.5vw, 26px);
    font-weight: 900;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.55vw, 30px);
    color: rgba(255,255,255,.9);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.nav-link,
.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.nav-links a:hover,
.dropdown-trigger:hover,
.nav-dropdown:focus-within .dropdown-trigger {
    color: #ffcf1a;
}

.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 180ms ease;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    display: grid;
    min-width: 240px;
    transform: translateX(-50%) translateY(8px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: 0 28px 70px rgba(0, 18, 46, .24);
    color: var(--text);
    opacity: 0;
    padding: 10px;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.dropdown-panel::before {
    content: "";
    position: absolute;
    inset: -14px 0 auto;
    height: 14px;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-dropdown:hover .dropdown-icon,
.nav-dropdown:focus-within .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-panel a {
    display: flex;
    align-items: center;
    min-height: 42px;
    border-radius: 12px;
    color: var(--text);
    padding: 0 12px;
    font-size: 14px;
    font-weight: 800;
}

.dropdown-panel a:hover,
.dropdown-panel a:focus {
    background: var(--primary-soft);
    color: var(--primary);
    outline: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 392px;
}

.portal-btn,
.register-btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.portal-btn {
    border: 1px solid #ffcf1a;
    color: #ffcf1a;
}

.register-btn {
    border: 1px solid #ffcf1a;
    background: #ffcf1a;
    color: #071330;
    box-shadow: 0 14px 34px rgba(255, 207, 26, .22);
}

.portal-btn:hover,
.portal-btn:focus,
.register-btn:hover,
.register-btn:focus {
    transform: translateY(-2px);
    outline: none;
}

.portal-btn:hover,
.portal-btn:focus {
    background: rgba(255, 207, 26, .1);
}

.register-btn:hover,
.register-btn:focus {
    background: #ffe16a;
    box-shadow: 0 18px 42px rgba(255, 207, 26, .3);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #ffffff;
    cursor: pointer;
}

.mobile-menu-button svg {
    width: 22px;
    height: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255,255,255,.12);
    background: #102358;
    padding: 14px 0 18px;
}

.mobile-panel.is-open {
    display: block;
    animation: panelDrop 180ms ease both;
}

.mobile-links {
    display: grid;
    gap: 8px;
}

.mobile-links a,
.mobile-group-label {
    display: flex;
    align-items: center;
    min-height: 42px;
    border-radius: 12px;
    color: rgba(255,255,255,.92);
    padding: 0 14px;
    font-weight: 850;
}

.mobile-links a:hover,
.mobile-links a:focus {
    background: rgba(255,255,255,.08);
    color: #ffcf1a;
    outline: none;
}

.mobile-links .mobile-register-link {
    justify-content: center;
    background: #ffcf1a;
    color: #071330;
}

.mobile-links .mobile-register-link:hover,
.mobile-links .mobile-register-link:focus {
    background: #ffe16a;
    color: #071330;
}

.mobile-group {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 6px;
}

.mobile-group-label {
    color: #ffcf1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@keyframes panelDrop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-theme="dark"] body {
    background: var(--bg);
    color: var(--text);
}

[data-theme="dark"] body[style] {
    background-color: var(--bg) !important;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-gray-50 {
    background-color: var(--bg) !important;
}

[data-theme="dark"] .bg-slate-100,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-white\/80,
[data-theme="dark"] .bg-white\/90,
[data-theme="dark"] .bg-white\/95 {
    background-color: var(--surface) !important;
}

[data-theme="dark"] .text-slate-950,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-gray-800 {
    color: var(--text) !important;
}

[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-500 {
    color: var(--muted) !important;
}

[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-gray-100,
[data-theme="dark"] .border-gray-200 {
    border-color: var(--border) !important;
}

[data-theme="dark"] .shadow-xl,
[data-theme="dark"] .shadow-2xl,
[data-theme="dark"] .shadow-lg,
[data-theme="dark"] .shadow-md {
    box-shadow: var(--shadow) !important;
}

[data-theme="dark"] .bulletin-archive,
[data-theme="dark"] .plk-shell,
[data-theme="dark"] .plk-section,
[data-theme="dark"] .press-font {
    background: var(--bg) !important;
    background-color: var(--bg) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .bulletin-filter-form,
[data-theme="dark"] .bulletin-search-control,
[data-theme="dark"] .bulletin-search-control:focus-within,
[data-theme="dark"] .bulletin-select-trigger,
[data-theme="dark"] .bulletin-select-trigger:hover,
[data-theme="dark"] .bulletin-select-trigger[aria-expanded="true"],
[data-theme="dark"] .bulletin-select-menu,
[data-theme="dark"] .bulletin-card,
[data-theme="dark"] .plk-service-card {
    border-color: var(--border) !important;
    background: var(--surface) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .bulletin-section-title,
[data-theme="dark"] .bulletin-search-input,
[data-theme="dark"] .bulletin-select-trigger,
[data-theme="dark"] .bulletin-select-option,
[data-theme="dark"] .bulletin-card-title,
[data-theme="dark"] .plk-section-title,
[data-theme="dark"] .plk-service-card h3 {
    color: var(--text) !important;
}

[data-theme="dark"] .bulletin-select-label span,
[data-theme="dark"] .bulletin-search-input::placeholder,
[data-theme="dark"] .bulletin-card-summary,
[data-theme="dark"] .bulletin-card-footer,
[data-theme="dark"] .bulletin-topic-chip,
[data-theme="dark"] .plk-section-copy,
[data-theme="dark"] .plk-service-card p {
    color: var(--muted) !important;
}

[data-theme="dark"] .bulletin-select-option:hover,
[data-theme="dark"] .bulletin-select-option.is-active,
[data-theme="dark"] .bulletin-topic-chip:hover,
[data-theme="dark"] .bulletin-topic-chip.is-active,
[data-theme="dark"] .bulletin-card:hover .bulletin-card-title {
    color: var(--primary) !important;
}

[data-theme="dark"] .bulletin-select-option:hover,
[data-theme="dark"] .bulletin-select-option.is-active,
[data-theme="dark"] .bulletin-card-media,
[data-theme="dark"] .plk-service-icon {
    background: var(--primary-soft) !important;
}

a,
button,
.metric-card,
.panel,
.workflow-card,
.module-row,
.content-table-row,
.builder-item,
.message-card {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

a.is-pressing,
button.is-pressing,
.metric-card.is-pressing,
.content-table-row.is-pressing,
.builder-item summary.is-pressing {
    transform: translateY(1px) scale(.99);
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 560ms ease, transform 560ms ease;
    will-change: opacity, transform;
}

.scroll-reveal[data-reveal-variant="soft"] {
    transform: translateY(18px);
}

.scroll-reveal[data-reveal-variant="scale"] {
    transform: translateY(20px) scale(.985);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none !important;
        transition: none !important;
    }
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #001a41;
    color: #ffffff;
    padding: 28px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(233, 195, 73, .55) rgba(255, 255, 255, .08);
}

.admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 69;
    background: rgba(3, 9, 20, .58);
    backdrop-filter: blur(6px);
}

.admin-sidebar-backdrop[hidden] {
    display: none;
}

.admin-sidebar::-webkit-scrollbar {
    width: 8px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .08);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(233, 195, 73, .55);
}

.brand-lockup,
.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    background: var(--gold);
    color: #001a41;
    font-weight: 800;
}

.brand-lockup small {
    display: block;
    margin-top: 3px;
    color: #b1c5ff;
}

.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 36px;
}

.side-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    border-left: 4px solid transparent;
    border-radius: 0 10px 10px 0;
    padding: 0 14px;
    color: #dbe7ff;
}

.side-link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: #e9c349;
}

.side-link span {
    min-width: 0;
}

.side-link:hover,
.side-link.is-active {
    border-left-color: var(--gold);
    background: #002d72;
    color: #ffffff;
}

.side-link em {
    color: #e9c349;
    font-size: 12px;
    font-style: normal;
}

.side-link.is-muted { opacity: 0.72; }

.admin-main { min-width: 0; }

.admin-menu-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.admin-menu-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    padding: 22px 32px;
    backdrop-filter: blur(10px);
}

.admin-topbar h1,
.panel h2,
.hero-panel h2 {
    margin: 0;
    letter-spacing: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-content {
    display: grid;
    gap: 24px;
    padding: 32px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-grid,
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-card,
.panel,
.workflow-card,
.hero-panel,
.auth-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    gap: 10px;
    padding: 20px;
}

.metric-card:hover,
.workflow-card:hover,
.content-table-row:hover,
.builder-item:hover,
.message-card:hover {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    transform: translateY(-2px);
}

.metric-card span,
.metric-card small,
.muted,
.workflow-card p,
.module-row p,
.table-row small {
    color: var(--muted);
}

.metric-card strong {
    color: var(--text);
    font-size: 34px;
    line-height: 1;
}

.tone-blue { border-top: 4px solid var(--blue); }
.tone-green { border-top: 4px solid var(--green); }
.tone-gold { border-top: 4px solid var(--gold); }
.tone-slate { border-top: 4px solid var(--muted); }

.split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 24px;
}

.panel { padding: 22px; }

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
    gap: 24px;
}

.chart-panel {
    min-height: 360px;
}

.bar-chart {
    display: flex;
    align-items: end;
    gap: 8px;
    min-height: 240px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(to top, color-mix(in srgb, var(--border) 46%, transparent) 1px, transparent 1px) 0 0 / 100% 25%,
        var(--surface-muted);
    padding: 18px 14px 34px;
}

.bar-item {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
    height: 220px;
    align-items: end;
    justify-content: center;
}

.bar-item.is-wide {
    max-width: none;
}

.bar-fill {
    display: block;
    width: 100%;
    max-width: 18px;
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, var(--blue), var(--primary));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 18%, transparent);
    transition: height 220ms ease, transform 180ms ease;
}

.monthly-chart .bar-fill {
    max-width: 64px;
    background: linear-gradient(180deg, var(--gold), var(--blue));
}

.bar-item:hover .bar-fill {
    transform: translateY(-3px);
}

.bar-item small {
    position: absolute;
    bottom: -24px;
    left: 50%;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-metrics .metric-card strong {
    font-size: 28px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.module-list,
.compact-table {
    display: grid;
    gap: 10px;
}

.module-row,
.table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 14px;
}

.module-row h3,
.module-row p,
.table-row strong,
.table-row small,
.workflow-card h3,
.workflow-card p {
    margin: 0;
}

.module-row span,
.badge-success,
.badge-muted,
.workflow-card span {
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success {
    background: color-mix(in srgb, var(--green) 18%, transparent);
    color: var(--green);
}

.badge-muted {
    background: var(--surface);
    color: var(--muted);
}

.accent-blue { border-left: 4px solid var(--blue); }
.accent-green { border-left: 4px solid var(--green); }
.accent-gold { border-left: 4px solid var(--gold); }
.accent-purple { border-left: 4px solid var(--purple); }
.accent-red { border-left: 4px solid var(--red); }
.accent-slate { border-left: 4px solid var(--muted); }

.hero-panel {
    padding: 30px;
    background:
        linear-gradient(120deg, color-mix(in srgb, var(--primary-soft) 74%, transparent), transparent),
        var(--surface);
}

.hero-panel h2 {
    max-width: 820px;
    font-size: 38px;
}

.hero-panel p:not(.eyebrow) {
    max-width: 760px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.workflow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workflow-card { padding: 22px; }
.workflow-card h3 { margin-top: 18px; }

.theme-toggle,
.theme-switch,
.ghost-button,
.danger-button,
.primary-button {
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 54px;
    min-width: 54px;
    padding: 0 6px;
    border-radius: 999px;
}

.switch-track {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 42px;
    height: 24px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    padding: 2px;
}

.switch-thumb {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
    transition: transform 180ms ease, background 180ms ease;
}

.theme-icon {
    position: absolute;
    width: 12px;
    height: 12px;
    color: #001a41;
    transition: opacity 150ms ease, transform 150ms ease;
}

.moon-icon {
    opacity: 0;
    transform: scale(.6) rotate(-20deg);
}

[data-theme="dark"] .switch-track {
    background: #001a41;
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

[data-theme="dark"] .switch-thumb {
    transform: translateX(18px);
    background: var(--primary);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: scale(.6) rotate(20deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    color: #08111d;
    transform: scale(1) rotate(0);
}

.ghost-button:hover,
.theme-toggle:hover,
.theme-switch:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ghost-button:hover,
.primary-button:hover,
.danger-button:hover {
    transform: translateY(-1px);
}

.danger-button {
    border-color: color-mix(in srgb, var(--red) 28%, var(--border));
    color: var(--red);
}

.primary-button {
    width: 100%;
    border-color: var(--primary);
    background: var(--primary);
    color: var(--surface);
}

[data-theme="dark"] .primary-button {
    color: #08111d;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--primary-soft) 65%, transparent), transparent 34%),
        var(--bg);
}

.auth-card {
    width: min(100%, 460px);
    padding: 30px;
}

.auth-brand h1 { margin: 0; }

.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.stack-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
}

.stack-form input[type="email"],
.stack-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 12px;
}

.stack-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.check-row {
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 10px;
}

.alert-error {
    border: 1px solid color-mix(in srgb, var(--red) 34%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--red) 10%, var(--surface));
    color: var(--red);
    padding: 12px;
}

.theme-toggle.full { width: 100%; margin-top: 18px; }
.theme-switch.full { width: 54px; margin: 18px auto 0; }
.empty-state { color: var(--muted); }

.notice-success {
    border: 1px solid color-mix(in srgb, var(--green) 34%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--green) 10%, var(--surface));
    color: var(--green);
    padding: 14px 16px;
    font-weight: 800;
}

.notice-danger {
    border: 1px solid color-mix(in srgb, var(--red) 34%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--red) 10%, var(--surface));
    color: var(--red);
    padding: 14px 16px;
    font-weight: 800;
}

.notice-danger ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.admin-editor-grid {
    grid-template-columns: minmax(340px, .52fr) minmax(0, 1fr);
}

.admin-form {
    display: grid;
    gap: 18px;
}

.admin-form.compact {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
    grid-column: 1 / -1;
}

.admin-form label,
.slug-field-grid label,
.article-main-fields label,
.article-side-fields label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="number"],
.admin-form input[type="file"],
.admin-form input[type="color"],
.admin-form select,
.admin-form textarea,
.slug-field-grid input[type="text"],
.article-main-fields input[type="text"],
.article-main-fields input[type="email"],
.article-main-fields input[type="password"],
.article-main-fields input[type="number"],
.article-main-fields input[type="file"],
.article-main-fields select,
.article-main-fields textarea,
.article-side-fields input[type="text"],
.article-side-fields input[type="email"],
.article-side-fields input[type="password"],
.article-side-fields input[type="number"],
.article-side-fields input[type="file"],
.article-side-fields select,
.article-side-fields textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 12px;
}

.admin-form textarea,
.article-main-fields textarea,
.article-side-fields textarea {
    min-height: 110px;
    padding-block: 12px;
    resize: vertical;
}

.admin-form input[type="color"] {
    min-height: 48px;
    padding: 6px;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.slug-field-grid input:focus,
.article-main-fields input:focus,
.article-main-fields select:focus,
.article-main-fields textarea:focus,
.article-side-fields input:focus,
.article-side-fields select:focus,
.article-side-fields textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.check-stack {
    display: grid;
    align-content: center;
    gap: 10px;
}

.nav-builder-list,
.section-editor-list,
.child-list {
    display: grid;
    gap: 14px;
}

.builder-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 14px;
}

.builder-item.child {
    background: var(--surface);
}

.builder-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.builder-item summary::-webkit-details-marker {
    display: none;
}

.builder-item strong,
.builder-item small {
    display: block;
}

.builder-item small {
    margin-top: 3px;
    color: var(--muted);
}

.builder-item em,
.switch-line {
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 6px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.child-list {
    margin-top: 14px;
    padding-left: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.section-editor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.switch-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 7px 11px 7px 8px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.section-status-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.section-status-toggle span {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border);
}

.section-status-toggle input:checked + span {
    background: var(--blue);
    box-shadow: none;
}

.section-status-toggle input:checked + span::after {
    content: "";
    width: 7px;
    height: 12px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translateY(-1px) rotate(45deg);
}

.section-status-toggle:focus-within {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.inline-button {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-bar input,
.filter-bar select {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 12px;
}

.livewire-table-shell {
    display: grid;
    gap: 18px;
}

.livewire-filter {
    align-items: center;
}

.livewire-loading {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.pagination-wrap {
    margin-top: 14px;
}

.pagination-wrap nav > div:first-child {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.pagination-wrap nav > div:last-child,
.pagination-wrap nav > div:last-child > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-wrap a,
.pagination-wrap span[aria-current] span,
.pagination-wrap span[aria-disabled] span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: var(--surface) !important;
    color: var(--text) !important;
    padding: 0 12px !important;
    font-size: 13px;
    font-weight: 800;
}

.pagination-wrap span[aria-current] span {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: var(--surface) !important;
}

[data-theme="dark"] .pagination-wrap span[aria-current] span {
    color: #08111d !important;
}

.content-table {
    display: grid;
    gap: 8px;
}

.content-table-head,
.content-table-row {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 160px 120px 190px;
    gap: 14px;
    align-items: center;
}

.content-table-head {
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--muted);
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.content-table-row {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 14px;
}

.content-table-row strong,
.content-table-row small {
    display: block;
}

.content-table-row small {
    margin-top: 4px;
    color: var(--muted);
}

.row-actions {
    display: flex;
    gap: 8px;
}

.article-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.article-main-fields,
.article-side-fields {
    display: grid;
    gap: 16px;
}

.slug-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr);
    gap: 16px;
}

.article-side-fields {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-muted);
    padding: 18px;
}

.content-editor {
    min-height: 380px !important;
}

.is-hidden-editor-source {
    display: none;
}

.rich-editor {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
}

.rich-editor.has-error {
    border-color: var(--red);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 14%, transparent);
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 10px;
}

.rich-editor-button {
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.rich-editor-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.rich-editor-canvas {
    min-height: 380px;
    padding: 16px;
    color: var(--text);
    line-height: 1.75;
    outline: none;
}

.rich-editor-canvas:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
}

.rich-editor-canvas h2,
.rich-editor-canvas h3,
.rich-editor-canvas p,
.rich-editor-canvas ul,
.rich-editor-canvas ol,
.rich-editor-canvas blockquote {
    margin-top: 0;
}

.rich-editor-canvas h2 {
    font-size: 28px;
    line-height: 1.25;
}

.rich-editor-canvas h3 {
    font-size: 22px;
    line-height: 1.3;
}

.rich-editor-canvas ul,
.rich-editor-canvas ol {
    padding-left: 24px;
}

.rich-editor-canvas blockquote {
    border-left: 4px solid var(--gold);
    color: var(--muted);
    margin-left: 0;
    padding-left: 14px;
}

.thumbnail-preview {
    width: 100%;
    max-height: 210px;
    border: 1px solid var(--border);
    border-radius: 12px;
    object-fit: cover;
}

.publish-toggle {
    border-radius: 12px;
    background: var(--surface);
    padding: 12px;
}

.tuition-grid {
    display: grid;
    gap: 18px;
}

.user-admin-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--blue) 9%, transparent), transparent 58%),
        var(--surface);
    box-shadow: var(--shadow);
}

.user-admin-hero h2 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
}

.user-admin-hero p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.user-admin-grid {
    display: grid;
    grid-template-columns: minmax(340px, .52fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.user-create-panel {
    position: sticky;
    top: 110px;
}

.user-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-form-grid label,
.user-form-grid input,
.user-form-grid select {
    min-width: 0;
}

.custom-select-field {
    position: relative;
}

.custom-select-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 14px 0 16px;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.custom-select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.custom-select-field.is-open .custom-select-trigger,
.custom-select-trigger:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.custom-select-field.is-open .custom-select-trigger svg {
    transform: rotate(180deg);
}

.custom-select-menu {
    position: absolute;
    z-index: 80;
    right: 0;
    left: 0;
    top: calc(100% + 8px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 58px rgba(15, 23, 42, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(.98);
    transform-origin: top;
    transition: opacity .16s ease, transform .16s ease;
}

.custom-select-field.is-open .custom-select-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.custom-select-scroll {
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
}

.custom-select-option {
    display: grid;
    gap: 3px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}

.custom-select-option strong,
.custom-select-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-option small {
    color: var(--muted);
    font-weight: 700;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
    background: color-mix(in srgb, var(--blue) 11%, var(--surface-muted));
}

.custom-select-option.is-selected strong {
    color: var(--primary);
}

.user-card-list {
    display: grid;
    gap: 12px;
}

.user-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-muted);
    padding: 14px;
}

.user-card summary {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    list-style: none;
}

.user-card summary::-webkit-details-marker {
    display: none;
}

.user-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: var(--surface);
    font-size: 20px;
    font-weight: 900;
}

[data-theme="dark"] .user-avatar {
    color: #08111d;
}

.user-card-main {
    min-width: 0;
}

.user-card-main strong,
.user-card-main small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-main small {
    margin-top: 2px;
    color: var(--muted);
}

.user-card em {
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 7px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.tuition-panel .panel-header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
}

.tuition-rows {
    display: grid;
    gap: 12px;
}

.tuition-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(170px, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 14px;
}

.tuition-remove {
    min-width: 84px;
}

.tuition-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tuition-empty {
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 18px;
}

.nsc-filter {
    grid-template-columns: minmax(220px, 1fr) 180px auto;
}

.content-table-head.nsc-book-head,
.content-table-row.nsc-book-row {
    grid-template-columns: minmax(300px, 1fr) 150px 150px 110px 220px;
}

.book-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.book-cell img,
.book-cover-placeholder {
    width: 48px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.book-cover-placeholder {
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.book-cover-preview {
    aspect-ratio: 3 / 4;
    max-height: 280px;
    object-fit: cover;
}

.nsc-logo-preview {
    width: 220px;
    height: 90px;
    object-fit: contain;
    background: var(--surface-muted);
    padding: 14px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.permission-check {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 12px;
}

.settings-sections {
    display: grid;
    gap: 22px;
}

.settings-block {
    display: grid;
    gap: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 18px;
}

.settings-block h2 {
    margin: 0;
}

.footer-link-list {
    display: grid;
    gap: 12px;
}

.footer-link-row {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 14px;
}

.floating-icon-preview {
    width: 80px;
    height: 80px;
    object-fit: contain;
    padding: 12px;
    background: var(--surface-muted);
}

.message-list {
    display: grid;
    gap: 14px;
}

.message-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 18px;
}

.message-card.is-unread {
    border-left: 4px solid var(--green);
    background: color-mix(in srgb, var(--green) 6%, var(--surface));
}

.message-head {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.message-head h3,
.message-body {
    margin: 0;
}

.message-body {
    margin-block: 12px;
    color: var(--text);
    line-height: 1.65;
}

.message-actions {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .brand {
        min-width: 0;
    }

    .nav-actions {
        min-width: 0;
    }

    .metric-grid,
    .workflow-grid,
    .analytics-grid,
    .split-grid,
    .section-editor-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-side-fields {
        position: static;
    }

    .user-admin-grid {
        grid-template-columns: 1fr;
    }

    .user-create-panel {
        position: static;
    }
}

@media (max-width: 980px) {
    .admin-shell {
        display: block;
        min-width: 0;
        overflow-x: hidden;
    }

    .admin-menu-toggle {
        display: grid;
        flex: 0 0 auto;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        width: min(320px, calc(100vw - 44px));
        height: 100dvh;
        transform: translateX(-104%);
        transition: transform 220ms ease;
        box-shadow: 22px 0 60px rgba(0, 0, 0, .24);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-sidebar-open {
        overflow: hidden;
    }

    .admin-topbar {
        align-items: center;
        justify-content: flex-start;
    }

    .admin-topbar > div:first-of-type {
        min-width: 0;
        flex: 1;
    }

    .admin-topbar h1 {
        overflow: hidden;
        font-size: clamp(26px, 5vw, 38px);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 780px) {
    .container {
        width: min(100% - 32px, 1520px);
    }

    .nav-inner {
        min-height: 72px;
        gap: 12px;
    }

    .site-nav-spacer {
        height: 72px;
    }

    .brand img {
        width: 44px;
        height: 44px;
    }

    .brand strong {
        max-width: min(54vw, 320px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 18px;
    }

    .portal-btn {
        display: none;
    }

    .admin-topbar,
    .topbar-actions,
    .module-row,
    .table-row,
    .message-card {
        align-items: stretch;
        flex-direction: column;
    }
    .admin-content,
    .admin-topbar {
        padding: 18px;
    }
    .metric-grid,
    .workflow-grid,
    .analytics-grid,
    .split-grid,
    .filter-bar,
    .slug-field-grid,
    .content-table-head,
    .content-table-row,
    .content-table-head.nsc-book-head,
    .content-table-row.nsc-book-row,
    .article-form-grid,
    .form-grid.two,
    .section-editor-list,
    .permission-grid,
    .footer-link-row,
    .message-card,
    .tuition-row {
        grid-template-columns: 1fr;
    }

    .bar-chart {
        overflow-x: auto;
        padding-inline: 12px;
    }

    .daily-chart .bar-item {
        min-width: 12px;
    }

    .compact-metrics {
        grid-template-columns: 1fr;
    }

    .content-table-head {
        display: none;
    }

    .row-actions {
        flex-wrap: wrap;
    }
    .hero-panel h2 { font-size: 30px; }

    .panel,
    .hero-panel,
    .workflow-card,
    .metric-card {
        padding: 18px;
    }

    .panel-header,
    .message-head,
    .media-manager-hero,
    .user-admin-hero,
    .content-media-head,
    .gallery-picker-head {
        align-items: stretch;
        flex-direction: column;
    }

    .user-form-grid,
    .user-card summary {
        grid-template-columns: 1fr;
    }

    .user-card em {
        width: fit-content;
    }

    .content-media-strip {
        grid-auto-columns: 132px;
    }

    .rich-editor-toolbar {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .rich-editor-button {
        flex: 0 0 auto;
    }
}

@media (max-width: 420px) {
    .brand strong {
        max-width: 44vw;
    }

    .theme-switch {
        width: 48px;
        min-width: 48px;
    }

    .admin-content,
    .admin-topbar {
        padding: 14px;
    }

    .topbar-actions .ghost-button {
        display: none;
    }

    .admin-topbar h1 {
        font-size: 24px;
    }

    .media-modal-backdrop {
        padding: 10px;
    }

    .media-modal-tabs {
        overflow-x: auto;
    }

    .media-modal-tabs button {
        flex: 0 0 auto;
    }
}

.media-manager-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--panel), var(--surface-muted));
    box-shadow: var(--shadow-soft);
}

.media-manager-hero h2 {
    margin: 6px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
}

.media-manager-hero p {
    max-width: 650px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.media-summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 12px;
    min-width: min(360px, 100%);
}

.media-summary-strip article {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
}

.media-summary-strip span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.media-summary-strip strong {
    display: block;
    margin-top: 6px;
    font-size: 32px;
}

.media-manager-shell {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.media-uploader {
    position: sticky;
    top: 100px;
}

.media-dropzone {
    gap: 10px;
}

.media-dropzone input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.media-dropzone-box {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 170px;
    padding: 24px;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 8%, var(--panel));
    text-align: center;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.media-dropzone-box:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.media-dropzone-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.media-dropzone-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.media-dropzone-box small {
    color: var(--muted);
}

.media-library-panel {
    min-width: 0;
}

.media-library-panel .filter-bar {
    grid-template-columns: minmax(0, 1fr) auto;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.media-tile {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow-soft);
}

.media-thumb {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: var(--surface-muted);
}

.media-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumb span {
    display: none;
    color: var(--muted);
    font-weight: 700;
}

.media-thumb.is-broken img {
    display: none;
}

.media-thumb.is-broken span {
    display: block;
}

.media-tile-body {
    display: grid;
    gap: 10px;
    padding: 15px;
}

.media-tile-body strong {
    color: var(--text);
    line-height: 1.25;
}

.media-tile-body small {
    color: var(--muted);
}

.media-copy-chip {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.media-copy-chip:hover,
.media-copy-chip.is-copied {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, var(--panel));
}

.media-copy-chip svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.media-copy-path {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-copy-chip strong {
    color: var(--accent);
    font-size: .84rem;
}

.media-actions {
    justify-content: space-between;
}

.media-preview-large {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
}

.editor-field {
    display: grid;
    gap: 10px;
}

.field-caption {
    color: var(--text);
    font-weight: 800;
}

.content-media-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
}

.content-media-head,
.gallery-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.content-media-head span,
.gallery-picker-head strong {
    color: var(--text);
    font-weight: 800;
}

.content-media-head a,
.gallery-picker-head a {
    color: var(--accent);
    font-size: .84rem;
    font-weight: 800;
    text-decoration: none;
}

.content-media-strip {
    display: grid;
    grid-auto-columns: 116px;
    grid-auto-flow: column;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.content-media-option,
.gallery-picker-item {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.content-media-option:hover,
.gallery-picker-item:hover,
.gallery-picker-item.is-selected {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}

.content-media-option img,
.gallery-picker-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: var(--surface-muted);
}

.content-media-option span,
.gallery-picker-item span {
    overflow: hidden;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-picker {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--blue) 7%, var(--surface));
}

.visually-hidden-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.gallery-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.gallery-picker-empty {
    margin: 0;
    color: var(--muted);
}

.compact-file-field {
    gap: 8px;
    padding-top: 4px;
}

.selected-thumbnail-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    min-height: 174px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-muted) 80%, var(--surface));
    color: var(--muted);
    font-weight: 800;
}

.selected-thumbnail-preview.is-visible {
    display: grid;
}

.selected-thumbnail-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.media-picker-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    border: 1px solid #0b3fb5;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8, #0f2d7a);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(29, 78, 216, .32);
    transition: transform .18s ease, box-shadow .18s ease;
}

.media-picker-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(29, 78, 216, .42);
}

.media-picker-trigger svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.has-media-modal {
    overflow: hidden;
}

.media-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 9, 20, .72);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.media-modal-backdrop[hidden] {
    display: none;
}

.media-modal {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(980px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    margin: auto;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.media-modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.media-modal-head h2 {
    margin: 4px 0 0;
    font-size: 28px;
}

.media-modal-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
}

.media-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
}

.media-modal-tabs {
    position: sticky;
    top: 86px;
    z-index: 2;
    display: flex;
    gap: 8px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--blue) 5%, var(--surface-muted));
}

.media-modal-tabs button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.media-modal-tabs button.is-active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.media-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 22px 24px 24px;
    background: var(--surface);
}

.media-tab-panel {
    display: none;
}

.media-tab-panel.is-active {
    display: block;
}

.modal-upload-box {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 300px;
    padding: 34px;
    border: 2px dashed color-mix(in srgb, var(--blue) 60%, var(--border));
    border-radius: 8px;
    background: color-mix(in srgb, var(--blue) 8%, var(--surface));
    text-align: center;
    cursor: pointer;
}

.modal-upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.modal-upload-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
}

.modal-upload-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-upload-box small {
    color: var(--muted);
}

.media-picker-search {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 800;
}

.media-picker-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text);
    padding: 0 16px;
    font: inherit;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.modal-gallery-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.modal-media-card {
    display: grid;
    gap: 9px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.modal-media-card:hover,
.modal-media-card.is-selected {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .1);
}

.modal-media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: var(--surface-muted);
}

.modal-media-card span {
    overflow: hidden;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .media-manager-hero,
    .media-manager-shell {
        grid-template-columns: 1fr;
    }

    .media-manager-hero {
        display: grid;
    }

    .media-uploader {
        position: static;
    }
}

/* Production polish: admin responsive and dense form ergonomics */
.admin-content,
.panel,
.hero-panel,
.metric-card,
.chart-panel,
.user-card,
.media-tile,
.builder-item {
    min-width: 0;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.article-main-fields input,
.article-main-fields select,
.article-main-fields textarea,
.article-side-fields input,
.article-side-fields select,
.article-side-fields textarea {
    max-width: 100%;
}

.compact-table,
.module-list,
.user-card-list,
.media-grid,
.content-media-strip,
.custom-select-scroll {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 35%, var(--border)) transparent;
}

.compact-table::-webkit-scrollbar,
.module-list::-webkit-scrollbar,
.user-card-list::-webkit-scrollbar,
.media-grid::-webkit-scrollbar,
.content-media-strip::-webkit-scrollbar,
.custom-select-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.compact-table::-webkit-scrollbar-thumb,
.module-list::-webkit-scrollbar-thumb,
.user-card-list::-webkit-scrollbar-thumb,
.media-grid::-webkit-scrollbar-thumb,
.content-media-strip::-webkit-scrollbar-thumb,
.custom-select-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 35%, var(--border));
}

@media (max-width: 1180px) {
    .analytics-grid,
    .split-grid,
    .admin-editor-grid,
    .media-manager-grid,
    .user-admin-grid {
        grid-template-columns: 1fr;
    }

    .user-create-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .admin-topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-actions .ghost-button,
    .topbar-actions .danger-button {
        min-height: 42px;
        padding-inline: 14px;
    }

    .form-grid.two,
    .user-form-grid,
    .article-form-grid,
    .filter-bar,
    .livewire-filter,
    .media-library-panel .filter-bar {
        grid-template-columns: 1fr;
    }

    .panel-header,
    .user-admin-hero,
    .content-media-head,
    .gallery-picker-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-row,
    .user-card summary {
        grid-template-columns: 1fr;
    }

    .bar-chart {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .daily-chart .bar-item {
        min-width: 24px;
    }

    .monthly-chart .bar-item {
        min-width: 120px;
    }

    .media-modal {
        width: min(100%, 94vw);
        max-height: 86vh;
    }

    .media-modal-tabs {
        overflow-x: auto;
    }

    .media-dropzone-box {
        min-height: 260px;
    }

    .custom-select-menu {
        position: fixed;
        right: 18px;
        left: 18px;
        top: auto;
        bottom: 18px;
        max-height: 58vh;
    }

    .custom-select-scroll {
        max-height: calc(58vh - 20px);
    }
}

.auth-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-inline-link,
.auth-link-button {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.auth-inline-link:hover,
.auth-link-button:hover {
    color: var(--accent);
}

.auth-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
}

.comment-admin-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.comment-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    border: 1px solid var(--border);
    border-left: 5px solid var(--border);
    border-radius: 14px;
    background: var(--surface-muted);
    padding: 16px;
}

.comment-admin-card.status-pending { border-left-color: var(--accent); }
.comment-admin-card.status-approved { border-left-color: var(--green); }
.comment-admin-card.status-rejected { border-left-color: var(--red); }

.comment-admin-main {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
}

.comment-admin-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.comment-admin-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.comment-admin-meta strong {
    color: var(--text);
}

.comment-admin-meta span,
.comment-admin-main small {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
}

.comment-admin-meta em {
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 4px 9px;
    font-size: .74rem;
    font-style: normal;
    font-weight: 900;
}

.comment-admin-main p {
    margin: 9px 0;
    color: var(--text);
    line-height: 1.65;
}

.comment-admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.comment-admin-actions select {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 0 12px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .comment-admin-card,
    .comment-admin-main {
        grid-template-columns: 1fr;
    }

    .comment-admin-actions {
        justify-content: stretch;
    }

    .comment-admin-actions form,
    .comment-admin-actions select,
    .comment-admin-actions button {
        width: 100%;
    }
}

.image-cropper {
    display: grid;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    padding: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.image-cropper[hidden] {
    display: none;
}

.image-cropper-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.image-cropper-head strong {
    color: var(--text);
    font-weight: 900;
}

.image-cropper-head small {
    color: var(--muted);
    font-weight: 800;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-cropper-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 260px;
    overflow: hidden;
    border: 1px dashed rgba(37, 99, 235, .55);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(15, 23, 42, .04));
    touch-action: none;
    cursor: grab;
}

.image-cropper-stage:active {
    cursor: grabbing;
}

.image-cropper-stage img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    user-select: none;
    transform-origin: center;
    transition: transform .12s ease;
    will-change: transform;
}

.crop-frame {
    position: absolute;
    inset: 10%;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 14px;
    box-shadow: 0 0 0 999px rgba(2, 6, 23, .32), inset 0 0 0 1px rgba(37, 99, 235, .35);
    pointer-events: none;
}

.image-cropper-zoom {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 900;
}

.image-cropper-zoom input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.image-cropper-apply {
    width: 100%;
}

.media-form-cropper {
    margin-top: -8px;
}

@media (max-width: 760px) {
    .image-cropper-stage {
        min-height: 220px;
    }

    .crop-frame {
        inset: 12%;
    }
}


.image-cropper-ratios {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.image-cropper-ratios button {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--muted);
    padding: 8px 12px;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
    transition: .18s ease;
}

.image-cropper-ratios button:hover,
.image-cropper-ratios button.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .18);
}

.crop-frame {
    inset: auto;
}

.crop-frame.is-circle {
    border-radius: 999px;
}

.crop-frame.is-free {
    border-style: dashed;
}

.crop-frame i {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .22);
    pointer-events: auto;
}

.crop-frame i[data-handle="n"] { top: -9px; left: calc(50% - 9px); cursor: ns-resize; }
.crop-frame i[data-handle="s"] { bottom: -9px; left: calc(50% - 9px); cursor: ns-resize; }
.crop-frame i[data-handle="e"] { right: -9px; top: calc(50% - 9px); cursor: ew-resize; }
.crop-frame i[data-handle="w"] { left: -9px; top: calc(50% - 9px); cursor: ew-resize; }
.crop-frame i[data-handle="ne"] { top: -9px; right: -9px; cursor: nesw-resize; }
.crop-frame i[data-handle="nw"] { top: -9px; left: -9px; cursor: nwse-resize; }
.crop-frame i[data-handle="se"] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.crop-frame i[data-handle="sw"] { left: -9px; bottom: -9px; cursor: nesw-resize; }

.crop-frame.is-circle i[data-handle="n"],
.crop-frame.is-circle i[data-handle="s"],
.crop-frame.is-circle i[data-handle="e"],
.crop-frame.is-circle i[data-handle="w"] {
    display: none;
}

.crop-frame.is-circle i[data-handle="ne"] { top: 9%; right: 9%; }
.crop-frame.is-circle i[data-handle="nw"] { top: 9%; left: 9%; }
.crop-frame.is-circle i[data-handle="se"] { right: 9%; bottom: 9%; }
.crop-frame.is-circle i[data-handle="sw"] { left: 9%; bottom: 9%; }

.image-cropper-stage,
.image-cropper-stage img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.image-cropper-stage img {
    pointer-events: none;
}

.crop-frame {
    pointer-events: none;
}

.crop-frame i {
    pointer-events: auto;
}

/* Modern admin file inputs and native select enhancers */
.admin-shell .modern-file-native,
.admin-shell .modern-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: .01;
    pointer-events: none;
}

.modern-file-field {
    display: grid;
    gap: 8px;
}

.modern-file-trigger {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 82px;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 48%, var(--border));
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
    color: var(--text);
    padding: 14px;
    cursor: pointer;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.modern-file-trigger:hover,
.modern-file-trigger:focus {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
    box-shadow: 0 16px 34px rgba(15, 23, 42, .1);
    outline: none;
}

.modern-file-trigger.has-file {
    border-style: solid;
    background: color-mix(in srgb, var(--green) 8%, var(--surface));
}

.modern-file-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: #fff;
    box-shadow: 0 14px 26px rgba(29, 78, 216, .28);
}

.modern-file-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modern-file-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.modern-file-copy strong,
.modern-file-copy small,
.modern-file-copy em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-file-copy strong {
    color: var(--text);
    font-size: .94rem;
    font-weight: 900;
    text-transform: capitalize;
}

.modern-file-copy small {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 800;
}

.modern-file-copy em {
    color: var(--accent);
    font-size: .76rem;
    font-style: normal;
    font-weight: 900;
}

.modern-file-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    padding: 0 14px;
    font-size: .82rem;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px var(--border);
    white-space: nowrap;
}

.modern-select {
    position: relative;
    min-width: 0;
}

.modern-select-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 0 13px 0 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.modern-select-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-select-trigger svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.modern-select.is-open .modern-select-trigger,
.modern-select-trigger:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
    outline: none;
}

.modern-select.is-open .modern-select-trigger svg {
    transform: rotate(180deg);
}

.modern-select-menu {
    position: absolute;
    z-index: 120;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 24px 54px rgba(15, 23, 42, .18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(.98);
    transform-origin: top;
    transition: opacity .16s ease, transform .16s ease;
}

.modern-select.is-open .modern-select-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.modern-select-scroll {
    display: grid;
    gap: 5px;
    max-height: 230px;
    overflow-y: auto;
    padding: 8px;
}

.modern-select-option {
    display: grid;
    width: 100%;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    padding: 10px 11px;
    cursor: pointer;
    text-align: left;
}

.modern-select-option strong {
    overflow: hidden;
    font-size: .9rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-select-option:hover,
.modern-select-option.is-selected {
    background: color-mix(in srgb, var(--blue) 11%, var(--surface-muted));
}

.modern-select-option.is-selected strong {
    color: var(--primary);
}

.modern-select-option:disabled {
    cursor: not-allowed;
    opacity: .48;
}

.modern-select-scroll::-webkit-scrollbar {
    width: 8px;
}

.modern-select-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modern-select-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 34%, transparent);
}

[data-theme="dark"] .modern-file-trigger:hover,
[data-theme="dark"] .modern-select-menu {
    box-shadow: 0 24px 58px rgba(0, 0, 0, .35);
}

@media (max-width: 640px) {
    .modern-file-trigger {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .modern-file-icon {
        width: 42px;
        height: 42px;
    }

    .modern-file-action {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Admin button alignment pass */
.admin-shell .ghost-button,
.admin-shell .danger-button,
.admin-shell .primary-button,
.admin-shell .inline-button,
.admin-shell .rich-editor-button,
.admin-shell .media-picker-trigger,
.admin-shell .media-modal-tabs button,
.admin-shell .media-modal-close,
.admin-shell .image-cropper-ratios button,
.admin-shell .image-cropper-apply,
.admin-shell .modern-select-trigger,
.admin-shell .modern-file-trigger,
.admin-shell .media-copy-chip,
.admin-shell .admin-menu-toggle {
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
}

.admin-shell .ghost-button,
.admin-shell .danger-button,
.admin-shell .primary-button,
.admin-shell .inline-button,
.admin-shell .rich-editor-button,
.admin-shell .media-picker-trigger,
.admin-shell .media-modal-tabs button,
.admin-shell .image-cropper-ratios button,
.admin-shell .image-cropper-apply {
    display: inline-grid;
    place-items: center;
    grid-auto-flow: column;
    gap: 8px;
}

.admin-shell .ghost-button,
.admin-shell .danger-button,
.admin-shell .primary-button,
.admin-shell .inline-button {
    min-height: 48px;
    padding: 0 18px;
    white-space: nowrap;
}

.admin-shell .topbar-actions {
    align-items: center;
}

.admin-shell .topbar-actions form {
    display: contents;
}

.admin-shell .topbar-actions .ghost-button,
.admin-shell .topbar-actions .danger-button {
    min-width: 132px;
}

.admin-shell .theme-switch,
.admin-shell .admin-menu-toggle,
.admin-shell .media-modal-close {
    display: inline-grid;
    place-items: center;
    line-height: 1;
    flex: 0 0 auto;
}

.admin-shell .theme-switch {
    width: 64px;
    min-width: 64px;
    height: 48px;
    min-height: 48px;
}

.admin-shell .switch-track {
    margin: 0;
}

.admin-shell .media-actions,
.admin-shell .row-actions,
.admin-shell .form-actions,
.admin-shell .comment-admin-actions,
.admin-shell .quick-actions,
.admin-shell .panel-actions {
    align-items: center;
}

.admin-shell .media-copy-chip {
    text-align: left;
}

.admin-shell .media-copy-chip strong,
.admin-shell .media-copy-path,
.admin-shell .modern-select-trigger span,
.admin-shell .modern-file-copy strong,
.admin-shell .modern-file-copy small,
.admin-shell .modern-file-copy em {
    line-height: 1.25;
}

.admin-shell .modern-file-action {
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

.admin-shell .filter-bar .ghost-button,
.admin-shell .filter-bar .primary-button,
.admin-shell .filter-bar .danger-button,
.admin-shell .media-library-panel .filter-bar .ghost-button {
    height: 52px;
    min-height: 52px;
}

.admin-shell button svg,
.admin-shell a svg {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .admin-shell .topbar-actions .ghost-button,
    .admin-shell .topbar-actions .danger-button {
        min-width: 0;
    }

    .admin-shell .ghost-button,
    .admin-shell .danger-button,
    .admin-shell .primary-button,
    .admin-shell .inline-button {
        white-space: normal;
    }
}
/* Admin responsive guard: prevent page-wide horizontal drift on every admin screen */
html:has(body.admin-shell),
body.admin-shell {
    max-width: 100%;
    overflow-x: hidden;
}

body.admin-shell,
.admin-main,
.admin-content,
.admin-topbar,
.admin-sidebar,
.admin-form,
.article-form-grid,
.article-main-fields,
.article-side-fields,
.admin-editor-grid,
.media-manager-shell,
.media-library-panel,
.user-admin-grid,
.split-grid,
.analytics-grid,
.filter-bar,
.livewire-filter,
.form-grid,
.user-form-grid,
.panel,
.hero-panel,
.content-table,
.content-table-row,
.content-table-head,
.module-row,
.table-row,
.modern-select,
.custom-select-field,
.gallery-picker,
.content-media-panel,
.rich-editor,
.rich-editor-toolbar,
.content-editor,
.media-copy-chip {
    min-width: 0;
    max-width: 100%;
}

.admin-main {
    width: 100%;
    overflow-x: clip;
}

.admin-content {
    width: 100%;
    overflow-x: clip;
}

.admin-topbar {
    width: 100%;
    min-width: 0;
}

.admin-topbar > div:first-of-type {
    min-width: 0;
}

.admin-topbar h1 {
    overflow-wrap: anywhere;
}

.topbar-actions {
    min-width: 0;
    flex-wrap: wrap;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.admin-shell button,
.admin-shell a,
.admin-shell label {
    max-width: 100%;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea {
    min-width: 0;
}

.article-form-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}

.article-side-fields {
    width: 100%;
}

.rich-editor-toolbar {
    overflow-x: auto;
}

.content-editor {
    overflow-wrap: anywhere;
}

.content-table,
.compact-table,
.module-list,
.user-card-list,
.media-grid {
    overflow-x: auto;
}

.media-copy-chip {
    grid-template-columns: 24px minmax(0, 1fr) auto;
}

@media (max-width: 1280px) {
    .article-form-grid,
    .admin-editor-grid,
    .media-manager-shell,
    .user-admin-grid,
    .split-grid,
    .analytics-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-side-fields,
    .media-uploader,
    .user-create-panel {
        position: static;
    }
}

@media (max-width: 980px) {
    .admin-shell {
        display: block;
        width: 100%;
    }

    .admin-main {
        width: 100%;
    }

    .admin-topbar {
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-topbar h1 {
        white-space: normal;
    }

    .topbar-actions {
        margin-left: 0;
    }
}

@media (max-width: 780px) {
    .admin-content,
    .admin-topbar {
        padding-inline: 16px;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .topbar-actions .ghost-button,
    .topbar-actions .danger-button {
        min-width: 0;
        width: 100%;
    }

    .filter-bar,
    .livewire-filter,
    .media-library-panel .filter-bar,
    .slug-field-grid,
    .form-grid.two,
    .user-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel,
    .hero-panel {
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .admin-content,
    .admin-topbar {
        padding-inline: 12px;
    }

    .topbar-actions {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .topbar-actions .ghost-button,
    .topbar-actions form,
    .topbar-actions .danger-button {
        grid-column: 1 / -1;
    }

    .media-copy-chip {
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .media-copy-chip .media-copy-button,
    .media-copy-chip button {
        grid-column: 1 / -1;
        width: 100%;
    }
}
/* Desktop admin sidebar stays fixed while the main panel scrolls */
@media (min-width: 981px) {
    body.admin-shell {
        display: block;
        padding-left: 280px;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 60;
        width: 280px;
        max-width: 280px;
        height: 100dvh;
        transform: none;
    }

    .admin-main {
        min-height: 100vh;
        width: 100%;
    }
}

@media (max-width: 980px) {
    body.admin-shell {
        padding-left: 0;
    }
}
/* Phase B custom admin foundation */
.admin-shell :focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 44%, transparent);
    outline-offset: 3px;
}

.side-group-label {
    display: block;
    margin: 18px 0 4px;
    color: rgba(233, 195, 73, .78);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.side-nav .side-group-label:first-child {
    margin-top: 0;
}

.admin-title-block {
    min-width: 0;
}

.admin-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.admin-breadcrumbs a {
    color: var(--primary);
}

.admin-breadcrumbs span:not(:last-child)::after,
.admin-breadcrumbs a:not(:last-child)::after {
    content: "/";
    margin-left: 8px;
    color: var(--muted);
}

.admin-page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--primary-soft) 62%, transparent), var(--surface));
    padding: 18px 20px;
}

.admin-page-intro p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.admin-page-intro-compact {
    background: transparent;
    padding: 0;
    border: 0;
}

.admin-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-notification-stack {
    display: grid;
    gap: 10px;
}

.admin-notification {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) 34px;
    align-items: start;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 14px;
    box-shadow: var(--shadow);
    transition: opacity .16s ease, transform .16s ease;
}

.admin-notification.is-hiding {
    opacity: 0;
    transform: translateY(-4px);
}

.admin-notification-dot {
    width: 12px;
    height: 12px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.admin-notification.is-success .admin-notification-dot { background: var(--green); }
.admin-notification.is-error .admin-notification-dot { background: var(--red); }
.admin-notification.is-warning .admin-notification-dot { background: var(--gold); }
.admin-notification.is-info .admin-notification-dot { background: var(--blue); }

.admin-notification strong,
.admin-notification p,
.admin-notification ul {
    margin: 0;
}

.admin-notification p,
.admin-notification li {
    color: var(--muted);
    line-height: 1.55;
}

.admin-notification ul {
    padding-left: 18px;
}

.admin-notification button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--muted);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.admin-user-menu {
    position: relative;
}

.admin-user-menu summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 48px;
    min-width: 190px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    list-style: none;
}

.admin-user-menu summary::-webkit-details-marker {
    display: none;
}

.admin-user-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
}

.admin-user-summary {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.admin-user-summary strong,
.admin-user-summary small,
.admin-user-panel strong,
.admin-user-panel span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-summary small,
.admin-user-panel span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.admin-user-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 150;
    display: grid;
    gap: 12px;
    width: min(280px, 80vw);
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 58px rgba(15, 23, 42, .18);
    padding: 14px;
}

.admin-user-panel p {
    display: grid;
    gap: 4px;
    margin: 0;
}

.admin-user-panel .danger-button {
    width: 100%;
}

.admin-confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, .62);
    backdrop-filter: blur(8px);
    padding: 20px;
}

.admin-confirm-backdrop[hidden] {
    display: none;
}

.admin-confirm-dialog {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 34px 90px rgba(2, 6, 23, .32);
    padding: 22px;
}

.admin-confirm-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--red) 14%, var(--surface));
    color: var(--red);
    font-size: 1.5rem;
    font-weight: 900;
}

.admin-confirm-dialog h2,
.admin-confirm-dialog p {
    margin: 0;
}

.admin-confirm-dialog h2 {
    font-size: 1.35rem;
}

.admin-confirm-dialog p:not(.eyebrow) {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.admin-confirm-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-dialog-open {
    overflow: hidden;
}

[data-theme="dark"] .admin-user-panel,
[data-theme="dark"] .admin-confirm-dialog,
[data-theme="dark"] .admin-notification {
    box-shadow: 0 26px 70px rgba(0, 0, 0, .42);
}

@media (max-width: 980px) {
    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 80;
        width: min(320px, 86vw);
        max-width: 86vw;
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-menu-toggle {
        display: inline-grid;
    }

    .admin-content {
        padding: 24px 18px;
    }
}

@media (max-width: 760px) {
    .admin-page-intro,
    .admin-confirm-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-page-actions,
    .admin-page-actions > *,
    .admin-confirm-actions > * {
        width: 100%;
    }

    .admin-user-menu,
    .admin-user-menu summary {
        width: 100%;
        min-width: 0;
    }

    .admin-user-panel {
        right: auto;
        left: 0;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .admin-confirm-dialog {
        grid-template-columns: 1fr;
    }

    .admin-confirm-icon {
        width: 46px;
        height: 46px;
    }
}

/* News Phase D workflow polish */
.field-hint {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted-text);
    font-size: 0.84rem;
    line-height: 1.45;
}

.publishing-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--soft-surface);
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
}

.button-cluster {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.split-actions {
    justify-content: space-between;
    gap: 1rem;
}

.badge-warning,
.badge-info,
.badge-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1;
    white-space: nowrap;
}

.badge-warning {
    background: #fff4d6;
    color: #8a5a00;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-danger {
    background: #fee2e2;
    color: #be123c;
}

[data-theme="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

[data-theme="dark"] .badge-info {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

[data-theme="dark"] .badge-danger {
    background: rgba(244, 63, 94, 0.18);
    color: #fda4af;
}

.news-table .content-table-row > div:first-child {
    min-width: 0;
}

.news-table .content-table-row small {
    overflow-wrap: anywhere;
}

@media (max-width: 820px) {
    .split-actions,
    .button-cluster {
        align-items: stretch;
        flex-direction: column;
    }

    .button-cluster > *,
    .split-actions > * {
        width: 100%;
    }
}

.admin-file-picker {
    align-items: center;
    background: var(--surface-muted, #f1f5f9);
    border: 1px dashed var(--border, #cbd5e1);
    border-radius: 16px;
    color: var(--text, #0f172a);
    cursor: pointer;
    display: flex;
    font-weight: 800;
    justify-content: center;
    min-height: 58px;
    overflow: hidden;
    padding: 0 18px;
    position: relative;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.admin-file-picker:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 10px 26px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}

.admin-file-picker input[type="file"] {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
}

[data-theme="dark"] .admin-file-picker {
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .28);
    color: #e5e7eb;
}

/* Phase G media platform */
.metadata-grid,
.usage-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.metadata-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metadata-grid span,
.usage-list span {
    display: grid;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    color: var(--muted);
    padding: 12px;
}

.metadata-grid strong,
.usage-list strong {
    color: var(--text);
}

.media-thumb.is-document {
    display: grid;
    place-items: center;
    gap: 6px;
    background: color-mix(in srgb, var(--blue) 10%, var(--surface-muted));
    color: var(--primary);
}

.media-thumb.is-document strong {
    font-size: 1.8rem;
    font-weight: 900;
}

.media-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 4px;
}

.media-select-card {
    display: grid;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 10px;
    cursor: pointer;
}

.media-select-card:hover,
.media-select-card:has(input:checked) {
    border-color: var(--blue);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--blue) 13%, transparent);
}

.media-select-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-muted);
}

.media-select-card span {
    overflow: hidden;
    color: var(--text);
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-select-card input[type="number"],
.media-select-card input[type="text"] {
    min-height: 38px;
    font-size: .88rem;
}

.banner-media-grid .media-select-card input[type="radio"],
.media-select-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.hero-copy {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(780px, calc(100% - 32px));
    color: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.02;
}

.hero-copy p {
    margin: 18px auto 0;
    max-width: 680px;
    color: rgba(255,255,255,.86);
    font-size: clamp(1rem, 1.5vw, 1.24rem);
    line-height: 1.65;
}

@media (max-width: 760px) {
    .metadata-grid {
        grid-template-columns: 1fr;
    }

    .media-select-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        max-height: 420px;
    }
}

.location-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.location-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    padding: 0 18px;
    font-weight: 900;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.location-tab:hover,
.location-tab:focus {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    outline: none;
}

.location-tab.is-active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.form-hint {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

label.is-muted {
    opacity: .72;
}

.dropdown-subgroup {
    display: grid;
    gap: 2px;
    margin: -2px 0 6px 10px;
    border-left: 2px solid var(--border);
    padding-left: 8px;
}

.dropdown-subgroup a {
    min-height: 36px;
    font-size: 13px;
    font-weight: 750;
}

/* Phase J: tuition management */
.tuition-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.tuition-plan-card,
.notice-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.tuition-plan-head,
.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tuition-plan-head h2,
.section-heading-row h2,
.tuition-workflow-panel h2 {
    margin: .45rem 0 .25rem;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    line-height: 1.15;
}

.tuition-plan-head p,
.muted,
.notice-card p {
    color: var(--muted);
    margin: .25rem 0 0;
}

.status-badge,
.badge-muted,
.badge-info,
.badge-success,
.badge-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border-radius: 999px;
    padding: .35rem .8rem;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.badge-muted,
.is-draft { background: var(--surface-muted); color: var(--muted); }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
[data-theme="dark"] .badge-info { background: rgba(37,99,235,.22); color: #bfdbfe; }
[data-theme="dark"] .badge-success { background: rgba(22,163,74,.22); color: #bbf7d0; }
[data-theme="dark"] .badge-warning { background: rgba(202,138,4,.22); color: #fde68a; }

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
    margin: 1rem 0;
}

.mini-stats div {
    border-radius: 16px;
    background: var(--surface-muted);
    padding: .8rem;
}

.mini-stats dt {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mini-stats dd {
    margin: .25rem 0 0;
    font-weight: 800;
}

.tuition-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1rem;
    align-items: start;
}

.tuition-workflow-panel {
    position: sticky;
    top: 1rem;
}

.tuition-items {
    display: grid;
    gap: .9rem;
}

.tuition-item-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(140px, .8fr) minmax(150px, .8fr) minmax(96px, .45fr) auto;
    gap: .75rem;
    align-items: end;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface-muted);
    padding: 1rem;
}

.tuition-item-row .wide {
    grid-column: 1 / -2;
}

.button-row {
    display: flex;
    gap: .6rem;
    align-items: center;
}

.button-row.wrap { flex-wrap: wrap; }
.button-row.vertical { flex-direction: column; align-items: stretch; }
.full-width { width: 100%; }

.icon-only {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 !important;
    font-size: 1.25rem;
    line-height: 1;
}

.notice-card.warning {
    background: color-mix(in srgb, #fef3c7 72%, var(--panel));
    border-color: #facc15;
}

@media (max-width: 1100px) {
    .tuition-editor-grid {
        grid-template-columns: 1fr;
    }

    .tuition-workflow-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .tuition-item-row {
        grid-template-columns: 1fr;
    }

    .tuition-item-row .wide {
        grid-column: auto;
    }

    .mini-stats {
        grid-template-columns: 1fr;
    }
}

/* Shared public footer: works on legacy CSS pages and Vite/Tailwind pages */
.site-footer {
    margin-top: auto;
    border-top: 1px solid #0f172a;
    background: #020817;
    color: #b6c2d3;
    padding: 3.5rem 0 2.4rem;
}

.site-footer__inner,
.site-footer__bottom {
    width: min(1280px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(180px, .55fr) minmax(260px, .9fr);
    gap: clamp(1.75rem, 4vw, 4.5rem);
    align-items: start;
}

.site-footer__brand-link {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: .9rem;
    color: #fff;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    font-weight: 950;
    line-height: 1.18;
    text-decoration: none;
}

.site-footer__logo {
    width: 3.15rem;
    height: 3.15rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.site-footer__text {
    max-width: 28rem;
    margin: 1.2rem 0 0;
    color: #b6c2d3;
    font-size: .98rem;
    line-height: 1.75;
}

.site-footer__heading {
    margin: .25rem 0 1rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
}

.site-footer__links,
.site-footer__contact-list {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links a,
.site-footer__contact-item {
    color: #b6c2d3;
    text-decoration: none;
    transition: color .16s ease, transform .16s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus,
.site-footer__contact-item:hover,
.site-footer__contact-item:focus {
    color: #ffcf1a;
    outline: none;
}

.site-footer__contact-item {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: .65rem;
    line-height: 1.55;
}

.site-footer__contact-item span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-footer__icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
    margin-top: .15rem;
}

.site-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.35rem;
}

.site-footer__social {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.055);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.site-footer__social:hover,
.site-footer__social:focus {
    border-color: #ffcf1a;
    background: #ffcf1a;
    transform: translateY(-1px);
    outline: none;
}

.site-footer__social img {
    width: 1.18rem;
    height: 1.18rem;
    object-fit: contain;
}

.site-footer__bottom {
    margin-top: 3rem;
    border-top: 1px solid rgba(148, 163, 184, .2);
    padding-top: 1.35rem;
    color: #9fb0c6;
    font-size: .92rem;
    text-align: center;
}

[data-theme="dark"] .site-footer,
.dark .site-footer {
    background: #020817;
    color: #b6c2d3;
}

@media (max-width: 860px) {
    .site-footer {
        padding-block: 3rem 2rem;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    .site-footer__inner,
    .site-footer__bottom {
        width: min(100% - 1.25rem, 1280px);
    }

    .site-footer__brand-link {
        align-items: flex-start;
    }

    .site-footer__logo {
        width: 2.75rem;
        height: 2.75rem;
    }
}

.pmb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    margin-top: 1.75rem;
}

.tuition-summary__head {
    align-items: flex-end;
}

.tuition-summary__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.tuition-summary__card {
    display: grid;
    min-height: 100%;
    gap: 1.25rem;
    border: 1px solid var(--border, #dbe3ee);
    border-radius: 1.35rem;
    background: var(--surface, #fff);
    padding: 1.35rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.tuition-summary__card span {
    color: #155cff;
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.tuition-summary__card h3 {
    margin: .35rem 0 .35rem;
    color: var(--text, #07122c);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 950;
    line-height: 1.16;
}

.tuition-summary__card p {
    margin: 0;
    color: var(--muted, #51617a);
    font-weight: 700;
}

.tuition-summary__card ul {
    display: grid;
    gap: .65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tuition-summary__card li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: .9rem;
    background: var(--surface-muted, #f4f7fb);
    padding: .85rem .95rem;
}

.tuition-summary__card li strong {
    color: var(--text, #07122c);
}

.tuition-summary__card li span {
    color: #155cff;
    font-size: .9rem;
    text-transform: none;
}

.tuition-summary__card .blue-button {
    width: 100%;
    min-height: 3rem;
}

.prodi-list-hero {
    background: linear-gradient(135deg, #061848 0%, #123a86 100%);
}

.admin-shell input[type="date"],
.admin-shell input[type="datetime-local"],
.admin-shell input[type="time"],
.admin-shell input[type="month"],
.admin-shell input[type="number"] {
    min-height: 3.45rem;
    border: 1px solid #d9e2ef;
    border-radius: .85rem;
    background: #f8fafc;
    color: #111827;
    padding: .85rem 1rem;
    font: inherit;
    font-weight: 750;
}

.admin-shell button,
.admin-shell .button,
.admin-shell .primary-button,
.admin-shell .secondary-button,
.admin-shell .danger-button,
.admin-shell .ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    line-height: 1.1;
    text-align: center;
}

@media (max-width: 980px) {
    .tuition-summary__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .pmb-actions .blue-button,
    .tuition-summary__head .text-link {
        width: 100%;
    }
}

/* Final responsive polish for tuition admin and public homepage */
.admin-shell .tuition-plan-form label,
.admin-shell .tuition-workflow-panel,
.admin-shell .tuition-item-row label {
    min-width: 0;
}

.form-grid.two-columns,
.tuition-scope-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-shell .tuition-plan-form input:not([type="checkbox"]):not([type="radio"]),
.admin-shell .tuition-plan-form textarea,
.admin-shell .tuition-plan-form select,
.admin-shell .tuition-item-row input:not([type="checkbox"]):not([type="radio"]),
.admin-shell .tuition-item-row textarea,
.admin-shell .tuition-item-row select {
    width: 100%;
    min-height: 3.45rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--surface-muted);
    color: var(--text);
    padding: .85rem 1rem;
    font: inherit;
    font-weight: 750;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.admin-shell .tuition-plan-form textarea,
.admin-shell .tuition-item-row textarea {
    min-height: 7rem;
    resize: vertical;
}

.admin-shell .tuition-plan-form input:focus,
.admin-shell .tuition-plan-form textarea:focus,
.admin-shell .tuition-plan-form select:focus,
.admin-shell .tuition-item-row input:focus,
.admin-shell .tuition-item-row textarea:focus,
.admin-shell .tuition-item-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent);
    background: var(--surface);
}

.admin-shell .tuition-plan-form input::placeholder,
.admin-shell .tuition-plan-form textarea::placeholder,
.admin-shell .tuition-item-row input::placeholder,
.admin-shell .tuition-item-row textarea::placeholder {
    color: var(--muted);
    opacity: .78;
}

.tuition-item-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(150px, .75fr) minmax(160px, .8fr) minmax(110px, .5fr) 3.25rem;
}

.tuition-item-row .wide {
    grid-column: 1 / -2;
}

@media (max-width: 1280px) {
    .tuition-editor-grid {
        grid-template-columns: 1fr;
    }

    .tuition-workflow-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .tuition-item-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tuition-item-row .wide {
        grid-column: 1 / -1;
    }

    .tuition-item-row .icon-only {
        width: 100%;
        min-width: 0;
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .form-grid.two-columns,
    .tuition-scope-grid,
    .tuition-item-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .tuition-item-row .wide,
    .tuition-item-row .icon-only {
        grid-column: auto;
    }

    .section-heading-row,
    .tuition-plan-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .nav-inner {
        gap: .65rem;
    }

    .brand {
        min-width: 0;
    }

    .brand strong {
        max-width: min(52vw, 18rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .section {
        padding: 4rem 0;
    }

    .program-grid,
    .news-grid,
    .facility-grid,
    .tuition-summary__grid,
    .pmb-grid,
    .location-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.4rem;
    }

    .pmb-grid,
    .location-grid {
        align-items: start;
    }

    .form-card,
    .map-card,
    .program-card,
    .news-card,
    .facility-card,
    .tuition-summary__card {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 1.25rem, 1520px);
    }

    .hero {
        min-height: calc(100svh - 4.5rem);
        background-position: center top;
    }

    .hero-cta {
        width: calc(100% - 2rem);
        min-height: 3.4rem;
        padding-inline: 1rem;
        font-size: 1rem;
        white-space: normal;
    }

    .blue-button {
        width: 100%;
        min-height: 3.25rem;
    }

    .lead-title h2,
    .section-head h2,
    .news-toolbar h2 {
        font-size: clamp(2rem, 11vw, 2.75rem);
        line-height: 1.08;
    }
}

/* Final compact polish pass for admin forms and public mobile navbar */
.admin-shell .panel,
.admin-shell .admin-card,
.admin-shell .tuition-plan-form,
.admin-shell .tuition-workflow-panel {
    min-width: 0;
}

.admin-shell .form-grid,
.admin-shell .tuition-scope-grid,
.admin-shell .tuition-item-row {
    gap: 1.25rem;
}

.admin-shell .tuition-plan-form label,
.admin-shell .tuition-item-row label,
.admin-shell .form-grid label,
.admin-shell .admin-form label {
    display: grid;
    min-width: 0;
    gap: .5rem;
    line-height: 1.25;
}

.admin-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-shell textarea,
.admin-shell select {
    width: 100%;
    max-width: 100%;
    min-height: 3.35rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--surface-muted);
    color: var(--text);
    padding: .8rem 1rem;
    font: inherit;
    font-weight: 700;
    outline: none;
    box-shadow: none;
}

.admin-shell textarea {
    min-height: 8.5rem;
    resize: vertical;
    line-height: 1.45;
}

.admin-shell input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.admin-shell textarea:focus,
.admin-shell select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}

.admin-shell input[type="file"] {
    width: 100%;
    max-width: 100%;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: .9rem;
    background: var(--surface-muted);
    padding: .75rem;
}

.admin-shell input[type="file"]::file-selector-button {
    border: 0;
    border-radius: .7rem;
    background: var(--primary);
    color: var(--primary-contrast);
    padding: .65rem .9rem;
    margin-right: .75rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-shell .tuition-plan-form .locked-notice,
.admin-shell .tuition-plan-form .status-note,
.admin-shell .tuition-plan-form [class*="notice"],
.admin-shell .tuition-plan-form [class*="alert"] {
    margin-block: 1rem 1.25rem;
}

.admin-shell .tuition-item-row {
    align-items: end;
    padding: 1.15rem;
}

.admin-shell .tuition-item-row > label {
    margin: 0;
}

.admin-shell .tuition-item-row .icon-button,
.admin-shell .tuition-item-row button[type="button"] {
    min-width: 3.25rem;
    min-height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-shell .toolbar-actions,
.admin-shell .page-actions,
.admin-shell .admin-header-actions {
    align-items: center;
    gap: .8rem;
}

@media (max-width: 1180px) {
    .admin-shell .tuition-editor-grid,
    .admin-shell .article-form-grid,
    .admin-shell .program-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-shell .form-grid,
    .admin-shell .tuition-scope-grid,
    .admin-shell .tuition-item-row {
        grid-template-columns: 1fr !important;
    }

    .admin-shell .admin-card,
    .admin-shell .panel {
        padding: 1rem;
    }

    .admin-shell .toolbar-actions,
    .admin-shell .page-actions,
    .admin-shell .admin-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .site .brand strong,
    .site .brand span:not(.brand-logo) {
        display: none;
    }

    .site .brand {
        min-width: auto;
        width: auto;
        flex: 0 0 auto;
    }

    .site .nav-inner {
        gap: .55rem;
    }

    .site .nav-actions .register-btn {
        display: none;
    }

    .site .mobile-panel .mobile-portal-link,
    .site .mobile-panel .mobile-register-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 2.75rem;
        border-radius: .9rem;
        font-weight: 900;
        text-align: center;
    }

    .site .mobile-panel .mobile-portal-link {
        margin-top: .7rem;
        border: 1px solid rgba(255, 210, 0, .65);
        background: rgba(255, 210, 0, .12);
        color: #ffd21a;
    }

    .site .mobile-panel .mobile-register-link {
        margin-top: .55rem;
        background: #ffd21a;
        color: #061538;
        box-shadow: 0 14px 28px rgba(255, 210, 0, .18);
    }

    .site .hero,
    .site .hero-slide,
    .site .hero-media,
    .site .hero-media img {
        min-height: calc(100svh - 4.4rem);
    }

    .site .hero-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
}

@media (max-width: 430px) {
    .site .nav-actions {
        gap: .45rem;
    }

    .site .theme-toggle,
    .site .mobile-toggle {
        width: 2.55rem;
        height: 2.55rem;
        min-width: 2.55rem;
    }
}

/* Targeted cleanup for reported admin spacing and mobile navbar issues */
@media (min-width: 981px) {
    .admin-shell .admin-menu-toggle {
        display: none !important;
    }
}

.admin-shell .admin-page-intro {
    gap: 1rem;
}

.admin-shell .tuition-plan-form .form-grid.two,
.admin-shell .tuition-plan-form .form-grid.two-columns,
.admin-shell .tuition-scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem 1.25rem;
}

.admin-shell .tuition-plan-form label > input,
.admin-shell .tuition-plan-form label > textarea,
.admin-shell .tuition-plan-form label > select,
.admin-shell .article-side-fields label > input,
.admin-shell .article-side-fields label > textarea,
.admin-shell .article-side-fields label > select {
    margin-top: .45rem;
}

.admin-shell .tuition-plan-form .locked-notice,
.admin-shell .tuition-plan-form .status-note,
.admin-shell .tuition-plan-form [class*="notice"],
.admin-shell .tuition-plan-form [class*="alert"] {
    display: block;
    margin: 1rem 0 1.4rem;
}

.admin-shell .tuition-item-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(150px, .75fr) minmax(160px, .8fr) minmax(110px, .55fr) 3.25rem;
    gap: 1.1rem;
    align-items: end;
}

.admin-shell .tuition-item-row label {
    gap: .5rem;
}

.admin-shell .article-side-fields {
    min-width: 0;
}

.admin-shell .admin-file-picker {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 4.4rem;
    border: 1px dashed color-mix(in srgb, var(--primary) 42%, var(--border));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--primary) 6%, var(--surface-muted));
    padding: .75rem;
    overflow: hidden;
}

.admin-shell .admin-file-picker input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.admin-shell .admin-file-picker::before {
    content: "Unggah gambar";
    min-width: 0;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-shell .admin-file-picker > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--surface);
    color: var(--primary);
    padding: 0 1rem;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
}

.admin-shell .admin-file-picker:hover,
.admin-shell .admin-file-picker:focus-within {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.admin-shell .ghost-button,
.admin-shell .danger-button,
.admin-shell .primary-button,
.admin-shell .inline-button,
.admin-shell .admin-page-actions a,
.admin-shell .admin-page-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    line-height: 1.1;
    text-align: center;
}

.site .mobile-panel .mobile-portal-link + .mobile-register-link {
    margin-top: .65rem;
}

@media (max-width: 780px) {
    .site .brand strong {
        display: none !important;
    }

    .site .brand {
        min-width: 0 !important;
        flex: 0 0 auto;
        gap: 0;
    }

    .site .nav-actions .register-btn,
    .site .nav-actions > .register-btn {
        display: none !important;
    }

    .site .nav-actions .portal-btn,
    .site .nav-actions > .portal-btn {
        display: none !important;
    }

    .site .mobile-links .mobile-portal-link {
        justify-content: center;
        border: 1px solid rgba(255, 207, 26, .72);
        background: rgba(255, 207, 26, .1);
        color: #ffcf1a;
    }

    .site .mobile-links .mobile-register-link {
        justify-content: center;
        border: 1px solid #ffcf1a;
        background: #ffcf1a;
        color: #071330;
    }

    .site .hero-media img,
    .site .hero-slide img,
    .site .hero img {
        object-fit: cover;
        object-position: center center;
    }
}

@media (max-width: 760px) {
    .admin-shell .tuition-plan-form .form-grid.two,
    .admin-shell .tuition-plan-form .form-grid.two-columns,
    .admin-shell .tuition-scope-grid,
    .admin-shell .tuition-item-row {
        grid-template-columns: 1fr !important;
    }

    .admin-shell .admin-file-picker {
        grid-template-columns: 1fr;
    }

    .admin-shell .admin-file-picker > span {
        width: 100%;
    }
}
/* Reusable media modal cleanup for legacy upload fields */
.admin-shell .admin-file-picker[data-modern-file-field] {
    display: block;
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    overflow: visible;
}

.admin-shell .admin-file-picker[data-modern-file-field]::before {
    content: none;
}

.admin-shell .admin-file-picker[data-modern-file-field] .modern-file-trigger {
    width: 100%;
}

.admin-shell .reusable-media-modal .modal-upload-box {
    width: 100%;
    cursor: pointer;
}

.admin-shell .reusable-media-modal .modal-media-card.is-loading {
    opacity: .65;
    cursor: wait;
}
/* Article/event form action and side picker layout fix */
.admin-shell .article-form-panel {
    display: grid;
    gap: 1.4rem;
}

.admin-shell .article-form-panel > .article-form-grid {
    min-width: 0;
}

.admin-shell .article-form-panel > .form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.admin-shell .article-form-panel > .form-actions .primary-button,
.admin-shell .article-form-panel > .form-actions .ghost-button,
.admin-shell .article-form-panel > .form-actions .danger-button {
    width: auto;
    flex: 0 0 auto;
}

.admin-shell .article-form-panel > .form-actions .primary-button {
    min-width: min(260px, 100%);
}

.admin-shell .article-side-fields .modern-file-field {
    width: 100%;
}

.admin-shell .article-side-fields .modern-file-trigger {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: .85rem;
    min-height: 6.4rem;
    padding: .9rem;
}

.admin-shell .article-side-fields .modern-file-copy strong,
.admin-shell .article-side-fields .modern-file-copy small,
.admin-shell .article-side-fields .modern-file-copy em {
    max-width: 100%;
}

.admin-shell .article-side-fields .modern-file-action {
    min-width: 4.2rem;
}

.admin-shell .article-side-fields .check-row {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.admin-shell .article-side-fields .check-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    flex: 0 0 auto;
}

@media (max-width: 980px) {
    .admin-shell .article-form-panel > .form-actions {
        align-items: stretch;
    }

    .admin-shell .article-form-panel > .form-actions .primary-button,
    .admin-shell .article-form-panel > .form-actions .ghost-button,
    .admin-shell .article-form-panel > .form-actions .danger-button {
        width: 100%;
        flex: 1 1 100%;
    }
}

@media (max-width: 420px) {
    .admin-shell .article-side-fields .modern-file-trigger {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .admin-shell .article-side-fields .modern-file-action {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Navbar builder layout and dropdown polish */
.admin-shell .admin-editor-grid {
    grid-template-columns: minmax(400px, 0.58fr) minmax(0, 1fr);
    align-items: start;
}

.admin-shell .admin-editor-grid > .panel,
.admin-shell .builder-item,
.admin-shell .builder-item .admin-form.compact {
    min-width: 0;
    overflow: visible;
}

.admin-shell .admin-editor-grid > .panel:first-child {
    position: relative;
    z-index: 20;
}

.admin-shell .navigation-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    justify-content: stretch;
    margin: 1rem 0 1.15rem;
}

.admin-shell .navigation-quick-actions form,
.admin-shell .navigation-quick-actions button {
    width: 100%;
}

.admin-shell .admin-editor-grid .admin-form,
.admin-shell .admin-editor-grid .form-grid {
    min-width: 0;
}

.admin-shell .admin-editor-grid .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-shell .admin-editor-grid .admin-form > .primary-button {
    width: 100%;
    margin-top: 0.25rem;
}

.admin-shell .admin-editor-grid .modern-select {
    position: relative;
    width: 100%;
    min-width: 0;
    z-index: 1;
}

.admin-shell .admin-editor-grid .modern-select.is-open {
    z-index: 700;
}

.admin-shell .admin-editor-grid .modern-select-menu {
    left: 0;
    right: auto;
    width: 100%;
    min-width: min(280px, calc(100vw - 48px));
    max-width: min(380px, calc(100vw - 48px));
    z-index: 800;
}

.admin-shell .admin-editor-grid .modern-select-toggle,
.admin-shell .admin-editor-grid .modern-select-option {
    gap: 0.65rem;
    text-align: left;
}

.admin-shell .admin-editor-grid .builder-item .form-actions {
    flex-wrap: wrap;
    gap: 0.65rem;
}

.admin-shell .admin-editor-grid .builder-item .form-actions .primary-button,
.admin-shell .admin-editor-grid .builder-item .form-actions .ghost-button,
.admin-shell .admin-editor-grid .builder-item .form-actions .danger-button {
    width: auto;
    min-width: 120px;
}

@media (max-width: 1180px) {
    .admin-shell .admin-editor-grid {
        grid-template-columns: 1fr;
    }

    .admin-shell .navigation-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-shell .navigation-quick-actions,
    .admin-shell .admin-editor-grid .form-grid.two {
        grid-template-columns: 1fr !important;
    }

    .admin-shell .admin-editor-grid .modern-select-menu {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .admin-shell .admin-editor-grid .builder-item .form-actions .primary-button,
    .admin-shell .admin-editor-grid .builder-item .form-actions .ghost-button,
    .admin-shell .admin-editor-grid .builder-item .form-actions .danger-button {
        width: 100%;
    }
}
/* Hero banner desktop and mobile media selection */
.admin-shell .banner-device-panel {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    padding: 1rem;
}

.admin-shell .banner-device-panel + .banner-device-panel {
    margin-top: 1.25rem;
}

.admin-shell .panel-header.compact {
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0;
}

.admin-shell .panel-header.compact h3 {
    margin: .15rem 0 0;
    font-size: 1.15rem;
}

.admin-shell .muted-text {
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
}

.admin-shell .media-select-empty {
    min-height: 9rem;
    place-items: center;
    text-align: center;
}

.admin-shell .media-select-empty span {
    padding: .75rem;
}
.admin-shell .hero-fit-options {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.admin-shell .hero-fit-option {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    padding: .65rem .9rem;
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: var(--surface-soft);
    color: var(--text);
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.admin-shell .hero-fit-option:hover,
.admin-shell .hero-fit-option:has(input:focus-visible) {
    border-color: var(--blue);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--blue) 14%, transparent);
}

.admin-shell .hero-fit-option:has(input:checked) {
    border-color: var(--blue);
    background: color-mix(in srgb, var(--blue) 12%, var(--surface));
    color: var(--blue);
}

.admin-shell .hero-fit-option input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--blue);
}

.admin-shell .banner-inline-upload {
    display: grid;
    gap: .55rem;
    font-size: .95rem;
    font-weight: 900;
    color: var(--text);
}

.admin-shell .banner-inline-upload small {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 750;
    line-height: 1.45;
}

.admin-shell .banner-device-panel .admin-file-picker {
    min-height: 4rem;
}




/* Upload picker feedback fixes */
.modal-upload-box.is-drag-over {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, var(--surface));
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.admin-shell .modern-file-preview {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .9rem;
    background: var(--surface-muted);
}

.admin-shell .modern-file-preview[hidden] {
    display: none;
}

.admin-shell .modern-file-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}
/* Scoped upload previews inside admin side panels */
.admin-shell .admin-upload-field {
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.admin-shell .admin-upload-field > label {
    margin: 0;
}

.admin-shell .admin-upload-field .thumbnail-preview,
.admin-shell .admin-upload-field .modern-file-preview {
    width: 100%;
    max-width: 100%;
}

.admin-shell .admin-upload-field .thumbnail-preview {
    display: block;
    aspect-ratio: 16 / 10;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: .9rem;
    border: 1px solid var(--border);
    background: var(--surface);
}

.admin-shell .admin-editor-grid > .admin-form .article-form-grid {
    grid-template-columns: minmax(0, 1fr);
}

.admin-shell .admin-editor-grid > .admin-form .article-side-fields {
    position: static;
}
/* Facility admin layout refinements */
.admin-shell .facility-edit-form {
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.admin-shell .facility-edit-form .article-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem;
}

.admin-shell .facility-edit-form .article-side-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    position: static !important;
    width: 100%;
    max-width: 100%;
    z-index: auto;
}

.admin-shell .facility-edit-form .article-main-fields,
.admin-shell .facility-edit-form .article-side-fields,
.admin-shell .facility-edit-form .admin-upload-field,
.admin-shell .facility-edit-form .modern-file-field,
.admin-shell .facility-edit-form .modern-file-trigger {
    min-width: 0;
    max-width: 100%;
}

.admin-shell .facility-edit-form .content-editor,
.admin-shell .facility-edit-form .rich-editor {
    clear: both;
    position: relative;
    z-index: 0;
}

.admin-shell .facility-admin-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.1rem;
    overflow: visible;
}

.admin-shell .facility-admin-tile {
    min-width: 0;
    overflow: hidden;
}

.admin-shell .facility-admin-tile .media-thumb {
    aspect-ratio: 16 / 10;
}

.admin-shell .facility-admin-tile .media-tile-body {
    display: grid;
    gap: .75rem;
    min-width: 0;
}

.admin-shell .facility-admin-tile .media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    width: 100%;
    overflow: visible;
}

.admin-shell .facility-admin-tile .media-actions > a,
.admin-shell .facility-admin-tile .media-actions > form,
.admin-shell .facility-admin-tile .media-actions button {
    flex: 1 1 92px;
    min-width: 0;
}

.admin-shell .facility-admin-tile .media-actions button,
.admin-shell .facility-admin-tile .media-actions a {
    width: 100%;
}
/* Facility form vertical layout */
.admin-shell .facility-form-stack {
    display: grid;
    gap: 1.15rem;
    min-width: 0;
}

.admin-shell .facility-publish-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface-muted);
}

.admin-shell .facility-publish-panel .check-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    margin: 0;
}

.admin-shell .facility-publish-panel .check-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    flex: 0 0 auto;
}

.admin-shell .facility-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.admin-shell .facility-side-actions > a {
    flex: 1 1 140px;
}

/* Keep the media picker tidy when image crop tools are visible. */
.admin-shell .media-modal {
    max-height: min(760px, calc(100dvh - 40px));
}

.admin-shell .media-modal-body {
    padding: 18px 22px 22px;
}

.admin-shell .media-tab-panel.is-active {
    display: grid;
    gap: 1rem;
}

.admin-shell .modal-upload-box {
    min-height: 180px;
    padding: 1.25rem;
}

.admin-shell .modal-upload-box strong,
.admin-shell .modal-upload-box small {
    max-width: 100%;
}

.admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .modal-upload-box {
    min-height: 88px;
    grid-template-columns: 52px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    text-align: left;
}

.admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .modal-upload-box .modal-upload-icon {
    grid-row: span 2;
    width: 52px;
    height: 52px;
}

.admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .modal-upload-box small {
    justify-self: start;
}

.admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .image-cropper {
    margin-top: 0;
}

.admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .image-cropper-stage {
    min-height: clamp(240px, 44vh, 360px);
}

@media (max-width: 760px) {
    .admin-shell .media-modal {
        max-height: calc(100dvh - 20px);
    }

    .admin-shell .media-modal-body {
        padding: 14px;
    }

    .admin-shell .media-modal-tabs {
        overflow-x: auto;
    }

    .admin-shell .modal-upload-box {
        min-height: 140px;
    }

    .admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .modal-upload-box {
        grid-template-columns: 44px minmax(0, 1fr);
        min-height: 76px;
        padding: .9rem;
    }

    .admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .modal-upload-box .modal-upload-icon {
        width: 44px;
        height: 44px;
    }

    .admin-shell .media-tab-panel:has(.image-cropper:not([hidden])) .image-cropper-stage {
        min-height: 260px;
    }
}

/* Unified image upload trigger: match Berita/Publikasi media picker. */
.admin-shell .modern-file-field.is-image-picker {
    display: grid;
    gap: .8rem;
    width: 100%;
    min-width: 0;
}

.admin-shell .modern-file-field.is-image-picker .modern-file-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    min-height: 58px;
    width: 100%;
    border: 1px solid color-mix(in srgb, var(--accent) 72%, var(--border));
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: #fff;
    padding: .95rem 1rem;
    text-align: center;
    box-shadow: 0 18px 34px rgba(29, 78, 216, .24);
}

.admin-shell .modern-file-field.is-image-picker .modern-file-trigger:hover,
.admin-shell .modern-file-field.is-image-picker .modern-file-trigger:focus {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 82%, white);
    background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 92%, white), var(--navy));
    box-shadow: 0 22px 40px rgba(29, 78, 216, .3);
}

.admin-shell .modern-file-field.is-image-picker .modern-file-icon {
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.admin-shell .modern-file-field.is-image-picker .modern-file-icon svg {
    width: 22px;
    height: 22px;
}

.admin-shell .modern-file-field.is-image-picker .modern-file-copy {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.admin-shell .modern-file-field.is-image-picker .modern-file-copy strong {
    color: inherit;
    font-size: 1rem;
    text-transform: none;
}

.admin-shell .modern-file-field.is-image-picker .modern-file-copy small,
.admin-shell .modern-file-field.is-image-picker .modern-file-copy em,
.admin-shell .modern-file-field.is-image-picker .modern-file-action {
    display: none;
}

.admin-shell .modern-file-field.is-image-picker + .modern-file-preview,
.admin-shell .modern-file-field.is-image-picker .modern-file-preview {
    margin-top: 0;
}

.admin-shell .modern-file-field.is-image-picker + .modern-file-preview img,
.admin-shell .modern-file-field.is-image-picker .modern-file-preview img {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 220px;
    object-fit: cover;
    border-radius: .9rem;
    border: 1px solid var(--border);
}

.admin-shell .reusable-media-modal .image-cropper {
    margin-top: 0;
}

@media (max-width: 760px) {
    .admin-shell .modern-file-field.is-image-picker .modern-file-trigger {
        min-height: 54px;
    }
}

.tracer-options-field {
    display: grid;
    gap: 12px;
}

.tracer-options-field[hidden] {
    display: none !important;
}

.tracer-options-header,
.tracer-option-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tracer-options-header {
    justify-content: space-between;
}

.tracer-options-header > span {
    font-weight: 800;
}

.tracer-options-list {
    display: grid;
    gap: 10px;
}

.tracer-option-row input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 760px) {
    .tracer-options-header,
    .tracer-option-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.tracer-question-builder {
    display: grid;
    gap: 18px;
}

.tracer-question-builder .panel-header {
    align-items: center;
}

.tracer-reorder-form {
    display: flex;
    justify-content: flex-end;
}

.tracer-question-list {
    display: grid;
    gap: 18px;
}

.tracer-question-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(15, 23, 42, .42);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .16);
}

.tracer-question-card.is-dragging {
    opacity: .72;
    outline: 2px solid rgba(166, 190, 255, .9);
}

.tracer-question-drag {
    justify-self: center;
    width: 92px;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(148, 163, 184, .12);
    cursor: grab;
    font-weight: 800;
}

.tracer-question-drag:active {
    cursor: grabbing;
}

.tracer-question-new-label {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tracer-question-actions,
.tracer-question-delete-form {
    display: flex;
    justify-content: flex-end;
}

.tracer-question-actions {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .tracer-question-builder .panel-header,
    .tracer-reorder-form,
    .tracer-question-actions,
    .tracer-question-delete-form {
        align-items: stretch;
        flex-direction: column;
    }

    .tracer-question-builder .panel-header .primary-button,
    .tracer-reorder-form .ghost-button,
    .tracer-question-actions .primary-button,
    .tracer-question-actions .ghost-button,
    .tracer-question-delete-form .danger-button {
        width: 100%;
    }
}
