
/* Cache-safe reset for new Z-CLOUD layout.
   This protects the dashboard if the old style.css is still cached by the browser. */
body.app-body,
body.auth-body {
    display: block !important;
    justify-content: initial !important;
    align-items: initial !important;
    width: auto !important;
    padding: 0 !important;
}

body.app-body a,
body.auth-body a {
    text-decoration: none;
}

:root {
    --bg: #eef4ff;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, .78);
    --text: #0f172a;
    --muted: #64748b;
    --border: #dbeafe;
    --border-strong: #bfdbfe;
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-soft: #eff6ff;
    --accent: #0ea5e9;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --shadow: 0 24px 70px rgba(37, 99, 235, .15);
    --shadow-soft: 0 14px 35px rgba(15, 23, 42, .08);
    --radius: 24px;
    --radius-sm: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
}

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

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

button {
    cursor: pointer;
}

.auth-body,
.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, .22), transparent 30%),
        radial-gradient(circle at 86% 2%, rgba(14, 165, 233, .2), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #ffffff 100%);
}

.auth-shell {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 440px;
    gap: 28px;
    align-items: center;
    padding: 42px 0;
}

.auth-shell.slim {
    width: min(520px, calc(100% - 32px));
    grid-template-columns: 1fr;
}

.auth-hero,
.auth-card {
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 32px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.auth-hero {
    padding: 44px;
    overflow: hidden;
    position: relative;
}

.auth-hero::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 300px;
    height: 300px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .18), rgba(14, 165, 233, .16));
}

.auth-logo,
.brand-logo {
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 14px 32px rgba(37, 99, 235, .28);
}

.auth-logo {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    font-size: 28px;
    margin-bottom: 26px;
}

.auth-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.auth-hero h1,
.hero-v2 h1,
.admin-hero h1 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -.05em;
    line-height: 1.02;
}

.auth-hero h1 {
    max-width: 720px;
    font-size: clamp(38px, 5vw, 68px);
}

.auth-hero p:not(.auth-kicker) {
    max-width: 620px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.auth-points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--border);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.auth-card {
    padding: 30px;
}

.auth-card.full {
    width: 100%;
}

.form-head h2 {
    margin: 0 0 6px;
    font-size: 30px;
    letter-spacing: -.04em;
}

.form-head p,
.login-register-text,
.muted {
    color: var(--muted);
}

.input-group,
.admin-form label {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    font-weight: 800;
    font-size: 13px;
}

.input-group input,
.admin-form input,
.admin-form textarea,
.admin-form select,
.search-field input,
.search-panel select,
.admin-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.input-group input,
.admin-form input,
.admin-form textarea,
.admin-form select {
    padding: 13px 14px;
}

.admin-form textarea {
    resize: vertical;
}

.input-group input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.search-field input:focus,
.search-panel select:focus,
.admin-search input:focus {
    border-color: rgba(37, 99, 235, .6);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-ghost,
.nav-pill,
.view-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    min-height: 44px;
    padding: 12px 18px;
    font-weight: 900;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn-primary {
    width: 100%;
    margin-top: 18px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 36px rgba(37, 99, 235, .24);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-ghost:hover,
.nav-pill:hover,
.view-toggle:hover {
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--border-strong);
}

.btn-danger {
    color: white;
    background: var(--danger);
}

.btn-ghost,
.view-toggle {
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
}

.small {
    min-height: 38px;
    padding: 9px 13px;
    font-size: 13px;
}

.login-register-text {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

.login-register-text a {
    color: var(--primary-dark);
    font-weight: 900;
}

.alert {
    margin: 14px 0;
    padding: 13px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
}

.alert.error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert.success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.alert.info {
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--border-strong);
}

.alert.warning {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.alert.wide {
    max-width: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(219, 234, 254, .9);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(18px);
}

.topbar-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 16px;
}

.brand strong {
    display: block;
    font-size: 16px;
    letter-spacing: -.04em;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-pill {
    min-height: 40px;
    padding: 10px 14px;
    color: white;
    background: #0f172a;
    font-size: 13px;
}

.admin-pill {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.page-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 64px;
}

.hero-v2,
.admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 24px;
}

.hero-content,
.hero-side,
.admin-hero,
.sidebar-card,
.category-card-v2,
.admin-card {
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: var(--radius);
    background: var(--surface-soft);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.hero-content {
    padding: clamp(24px, 4vw, 44px);
}

.hero-v2 h1,
.admin-hero h1 {
    font-size: clamp(34px, 4.5vw, 58px);
}

.hero-v2 p,
.admin-hero p,
.section-heading p,
.admin-card-head p {
    color: var(--muted);
    line-height: 1.6;
}

.hero-v2 p {
    max-width: 820px;
    font-size: 16px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 12px;
    margin-top: 24px;
}

.search-field {
    position: relative;
}

.search-field .fa-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-field input {
    height: 56px;
    padding: 0 52px 0 44px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

#clearSearch {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--muted);
    background: #f1f5f9;
}

.search-panel select {
    height: 56px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 900;
}

.quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-chips button {
    border: 1px solid var(--border);
    background: white;
    color: var(--primary-dark);
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.hero-side {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    padding: 18px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--border);
}

.stat-card strong {
    display: block;
    font-size: 34px;
    letter-spacing: -.05em;
    color: var(--primary-dark);
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.updates-card {
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid var(--border);
}

.updates-card h2 {
    margin: 0 0 12px;
    font-size: 16px;
    letter-spacing: -.03em;
}

.updates-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
    font-weight: 700;
}

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

.content-layout.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
}

.category-sidebar {
    position: sticky;
    top: 92px;
}

.sidebar-card {
    padding: 16px;
}

.sidebar-card h3 {
    margin: 4px 6px 12px;
    font-size: 15px;
    letter-spacing: -.03em;
}

.category-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    padding: 11px 12px;
    background: transparent;
    color: var(--muted);
    text-align: left;
    font-size: 13px;
    font-weight: 900;
}

.category-nav span {
    color: var(--primary-dark);
}

.category-nav:hover,
.category-nav.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
}


/* Sidebar kategori disembunyikan sesuai revisi. Filter kategori tetap tersedia di bagian pencarian. */
.category-sidebar {
    display: none !important;
}

.library-area {
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 16px;
}

.section-heading h2,
.admin-card-head h2 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -.04em;
}

.section-heading p,
.admin-card-head p {
    margin: 4px 0 0;
    font-size: 14px;
}

.grid-v2 {
    display: grid;
    gap: 16px;
}

.category-card-v2 {
    overflow: hidden;
}

.category-toggle {
    width: 100%;
    border: 0;
    padding: 18px;
    background: rgba(255, 255, 255, .74);
    color: var(--text);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: center;
    text-align: left;
}

.category-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.category-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.category-title-wrap strong {
    display: block;
    font-size: 17px;
    letter-spacing: -.03em;
}

.category-title-wrap small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.item-count {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.chevron {
    color: var(--muted);
    transition: transform .2s ease;
}

.category-card-v2.collapsed .chevron {
    transform: rotate(-90deg);
}

.link-list-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 18px 18px;
}

.category-card-v2.collapsed .link-list-v2 {
    display: none;
}

.doc-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    background: white;
    border: 1px solid #eaf1ff;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.doc-row:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    background: #f8fbff;
}

.doc-row.disabled {
    opacity: .48;
    cursor: not-allowed;
}

.doc-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 900;
}

.doc-main i {
    color: var(--primary);
}

.doc-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-meta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

mark {
    color: inherit;
    background: #fef08a;
    border-radius: 5px;
    padding: 0 3px;
}

.empty-state {
    display: none;
    place-items: center;
    text-align: center;
    gap: 8px;
    padding: 40px 24px;
    margin-top: 18px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    background: white;
    color: var(--muted);
}

.empty-state i {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.empty-state strong {
    color: var(--text);
    font-size: 18px;
}

.admin-shell {
    padding-top: 24px;
}

.admin-hero {
    grid-template-columns: minmax(0, 1fr) 290px;
    padding: 28px;
}

.admin-stats {
    align-self: center;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-card {
    padding: 20px;
}

.admin-card.full-width {
    grid-column: 1 / -1;
}

.admin-card-head {
    margin-bottom: 14px;
}

.admin-card-head.split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

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

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form input {
    min-height: 44px;
}

.grow {
    flex: 1;
}

.admin-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.admin-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-search {
    position: relative;
    width: min(360px, 100%);
}

.admin-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.admin-search input {
    min-height: 46px;
    border-radius: 999px;
    padding: 0 16px 0 40px;
    font-weight: 700;
}

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

.section-editor {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fbfdff;
    overflow: hidden;
}

.section-editor summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.section-editor summary::-webkit-details-marker {
    display: none;
}

.section-editor summary span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-editor summary i {
    color: var(--primary);
}

.section-editor summary em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.section-editor-body {
    display: grid;
    gap: 16px;
    padding: 0 18px 18px;
}

.section-form,
.file-form,
.file-edit-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.section-form .wide-field {
    grid-column: span 2;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions.mini {
    flex-wrap: nowrap;
}

.add-file-panel {
    padding: 16px;
    border-radius: 18px;
    background: var(--primary-soft);
    border: 1px solid var(--border-strong);
}

.add-file-panel h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.file-editor-list {
    display: grid;
    gap: 10px;
}

.file-editor-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-radius: 18px;
    background: white;
    border: 1px solid #eaf1ff;
}

.file-edit-form {
    grid-template-columns: minmax(160px, .8fr) minmax(220px, 1.3fr) minmax(160px, .7fr) auto;
}

@media (max-width: 1100px) {
    .hero-v2,
    .admin-hero,
    .content-layout,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .category-sidebar {
        position: static;
    }

    .sidebar-card {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        align-items: center;
    }

    .sidebar-card h3 {
        display: none;
    }

    .category-nav {
        width: auto;
        white-space: nowrap;
        background: white;
        border: 1px solid var(--border);
    }

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

    .section-form,
    .file-form,
    .file-edit-form,
    .file-editor-row {
        grid-template-columns: 1fr;
    }

    .section-form .wide-field {
        grid-column: auto;
    }

    .row-actions.mini {
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-actions {
        width: 100%;
    }

    .nav-pill {
        flex: 1;
    }

    .page-shell {
        width: min(100% - 20px, 1280px);
        padding-top: 14px;
    }

    .hero-content,
    .hero-side,
    .admin-hero,
    .admin-card {
        border-radius: 20px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .link-list-v2 {
        grid-template-columns: 1fr;
        padding: 0 12px 12px;
    }

    .category-toggle {
        grid-template-columns: 1fr auto;
        padding: 14px;
    }

    .category-toggle .item-count {
        display: none;
    }

    .category-title-wrap {
        align-items: flex-start;
    }

    .category-icon {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .doc-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .doc-title {
        white-space: normal;
    }

    .section-heading,
    .admin-card-head.split,
    .inline-form,
    .admin-list-row {
        align-items: stretch;
        flex-direction: column;
    }

    .view-toggle,
    .inline-form .btn-primary,
    .inline-form .btn-secondary,
    .inline-form .btn-danger {
        width: 100%;
    }

    .auth-shell {
        width: min(100% - 20px, 1120px);
        padding: 20px 0;
    }

    .auth-hero,
    .auth-card {
        border-radius: 24px;
        padding: 24px;
    }

    .auth-points {
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .brand small {
        display: none;
    }

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

    .hero-v2 h1,
    .admin-hero h1 {
        font-size: 34px;
    }
}

/* Admin source option and keyword index */
.is-hidden {
    display: none !important;
}

.admin-form label small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.source-choice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
}

.source-choice > span {
    width: 100%;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.source-choice label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #eaf1ff;
    border-radius: 999px;
    background: #f8fbff;
    color: var(--primary-dark);
    cursor: pointer;
}

.source-choice input[type="radio"] {
    width: auto;
}

.file-form,
.file-edit-form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.file-form > label,
.file-form > .source-field,
.file-form > .source-choice {
    grid-column: span 3;
}

.file-form > .wide-field {
    grid-column: span 4;
}

.file-form > button {
    grid-column: span 2;
}

.file-edit-form > label,
.file-edit-form > .source-field,
.file-edit-form > .source-choice {
    grid-column: span 3;
}

.file-edit-form > button {
    grid-column: span 12;
    justify-self: end;
}

.doc-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.doc-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 1100px) {
    .file-form,
    .file-edit-form,
    .file-form > label,
    .file-form > .source-field,
    .file-form > .source-choice,
    .file-form > .wide-field,
    .file-form > button,
    .file-edit-form > label,
    .file-edit-form > .source-field,
    .file-edit-form > .source-choice,
    .file-edit-form > button {
        grid-column: 1 / -1;
    }

    .file-edit-form > button {
        justify-self: stretch;
    }
}

/* Dashboard layout adjusted to match the clean compact reference view */
:root {
    --dashboard-width: 1180px;
}

body.app-body {
    background: linear-gradient(180deg, #eef4ff 0%, #eaf1ff 100%);
}

body.app-body .topbar {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid #dbeafe;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}

body.app-body .topbar-inner,
body.app-body .page-shell {
    width: min(var(--dashboard-width), calc(100% - 28px));
}

body.app-body .compact-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    padding: 14px 0;
}

body.app-body .brand {
    gap: 12px;
}

body.app-body .brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    font-size: 18px;
}

body.app-body .brand strong {
    font-size: 16px;
    letter-spacing: -.03em;
}

body.app-body .brand small {
    display: none;
}

.topbar-search {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: center;
}

body.app-body .compact-search input,
body.app-body .topbar-search select {
    height: 46px;
    border-radius: 999px;
    border-color: #bfdbfe;
    background: #fff;
    box-shadow: 0 10px 26px rgba(37, 99, 235, .09);
    font-size: 14px;
    font-weight: 700;
}

body.app-body .compact-search input {
    padding: 0 46px 0 44px;
}

body.app-body .compact-search .fa-search {
    left: 18px;
    font-size: 15px;
}

body.app-body #clearSearch {
    width: 32px;
    height: 32px;
    right: 7px;
    font-size: 13px;
}

body.app-body .topbar-search select {
    padding: 0 18px;
    font-size: 13px;
    font-weight: 900;
}

body.app-body .top-actions {
    gap: 8px;
}

body.app-body .nav-pill {
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #061229;
    font-size: 13px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .15);
}

body.app-body .admin-pill {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

body.app-body .page-shell {
    padding: 36px 0 80px;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.65fr) minmax(360px, 1fr);
    gap: 22px;
    margin-bottom: 26px;
}

.dashboard-hero .hero-content,
.dashboard-hero .updates-only {
    min-height: 320px;
    border: 1px solid #bfdbfe;
    border-radius: 24px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 45px rgba(37, 99, 235, .08);
}

.dashboard-hero .hero-content {
    position: relative;
    overflow: hidden;
    padding: 38px 42px 34px;
}

.dashboard-hero .hero-content::after {
    content: '';
    position: absolute;
    right: -95px;
    bottom: -105px;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .22);
}

.dashboard-hero .eyebrow {
    margin-bottom: 18px;
    padding: 9px 14px;
    background: #ede9fe;
    color: #1e3a8a;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 650px;
    font-size: clamp(44px, 4vw, 62px);
    line-height: 1.04;
    letter-spacing: -.06em;
}

.dashboard-hero p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 16px 0 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 700;
}

.dashboard-hero .hero-stats {
    position: relative;
    z-index: 1;
    width: 310px;
    margin-top: 28px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.dashboard-hero .stat-card {
    padding: 18px 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #bfdbfe;
    box-shadow: none;
}

.dashboard-hero .stat-card strong {
    font-size: 28px;
    color: #0f172a;
}

.dashboard-hero .stat-card span {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
}

.dashboard-hero .updates-only {
    padding: 0;
    display: block;
}

.dashboard-hero .updates-card {
    height: 100%;
    padding: 30px 28px;
    border: 0;
    border-radius: 24px;
    background: rgba(255, 255, 255, .78);
}

.dashboard-hero .updates-card h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.dashboard-hero .updates-card ul {
    padding-left: 22px;
    color: #9a3412;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 700;
}

body.app-body .content-layout,
body.app-body .library-area {
    min-width: 0;
}

body.app-body .section-heading {
    margin: 0 0 18px;
}

body.app-body .section-heading h2 {
    font-size: 26px;
    letter-spacing: -.03em;
}

body.app-body .section-heading p {
    margin-top: 8px;
    font-size: 14px;
    color: #64748b;
}

body.app-body .grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

body.app-body .category-card-v2 {
    height: 330px;
    border: 1px solid #dbeafe;
    border-radius: 22px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
    overflow: hidden;
}

body.app-body .category-toggle {
    pointer-events: none;
    padding: 22px 22px 14px;
    background: transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body.app-body .category-title-wrap {
    gap: 14px;
    align-items: flex-start;
}

body.app-body .category-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 20px;
}

body.app-body .category-title-wrap strong {
    font-size: 17px;
    letter-spacing: -.03em;
}

body.app-body .category-title-wrap small {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}

body.app-body .item-count,
body.app-body .chevron {
    display: none;
}

body.app-body .link-list-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    max-height: 230px;
    overflow-y: auto;
    padding: 0 22px 22px;
    scrollbar-width: thin;
}

body.app-body .category-card-v2.collapsed .link-list-v2 {
    display: grid;
}

body.app-body .link-list-v2::-webkit-scrollbar {
    width: 8px;
}

body.app-body .link-list-v2::-webkit-scrollbar-track {
    background: transparent;
}

body.app-body .link-list-v2::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

body.app-body .doc-row {
    min-height: 42px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

body.app-body .doc-row:hover {
    background: #eef6ff;
    border-color: #bfdbfe;
}

body.app-body .doc-main {
    gap: 9px;
    font-size: 13px;
    font-weight: 900;
}

body.app-body .doc-main i {
    color: #2563eb;
    font-size: 13px;
}

body.app-body .doc-meta {
    font-size: 0;
    gap: 0;
}

body.app-body .doc-meta i {
    color: #334155;
    font-size: 13px;
}

body.app-body .doc-tags {
    display: none;
}

body.app-body .empty-state {
    border-radius: 14px;
    padding: 34px 24px;
}

@media (max-width: 860px) {
    body.app-body .compact-topbar {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    body.app-body .topbar-search {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body.app-body .top-actions {
        justify-content: flex-end;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    body.app-body .grid-v2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.app-body .topbar-inner,
    body.app-body .page-shell {
        width: min(100% - 20px, var(--dashboard-width));
    }

    body.app-body .grid-v2 {
        grid-template-columns: 1fr;
    }

    body.app-body .category-card-v2 {
        height: auto;
        min-height: 220px;
    }

    body.app-body .link-list-v2 {
        max-height: none;
    }

    .dashboard-hero h1 {
        font-size: 30px;
    }
}


/* Normal desktop scale patch. Keeps the clean reference design but removes the tiny 760px compact view. */
@media (min-width: 861px) {
    body.app-body .topbar-inner,
    body.app-body .page-shell {
        width: min(1180px, calc(100% - 56px));
    }

    body.app-body .grid-v2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    body.app-body .topbar-inner,
    body.app-body .page-shell {
        width: min(1240px, calc(100% - 72px));
    }
}

/* Mobile category card patch: full-width card with internal scroll, like the approved reference. */
@media (max-width: 560px) {
    body.app-body .page-shell {
        width: min(100% - 12px, var(--dashboard-width));
        padding-top: 12px;
        padding-bottom: 44px;
    }

    body.app-body .grid-v2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.app-body .category-card-v2 {
        height: 358px;
        min-height: 0;
        display: flex;
        flex-direction: column;
        border-radius: 22px;
        background: rgba(255, 255, 255, .96);
        border: 1px solid #dbeafe;
        box-shadow: 0 14px 36px rgba(37, 99, 235, .10);
        overflow: hidden;
    }

    body.app-body .category-toggle {
        flex: 0 0 auto;
        padding: 20px 20px 12px;
        background: transparent;
    }

    body.app-body .category-title-wrap {
        gap: 13px;
        align-items: flex-start;
    }

    body.app-body .category-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
        font-size: 18px;
    }

    body.app-body .category-title-wrap strong {
        font-size: 18px;
        line-height: 1.15;
    }

    body.app-body .category-title-wrap small {
        margin-top: 5px;
        font-size: 13px;
        line-height: 1.35;
    }

    body.app-body .link-list-v2 {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        display: grid;
        align-content: start;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 0 14px 16px 20px;
        scrollbar-width: auto;
        scrollbar-color: #7b8794 transparent;
    }

    body.app-body .link-list-v2::-webkit-scrollbar {
        width: 8px;
    }

    body.app-body .link-list-v2::-webkit-scrollbar-track {
        background: transparent;
    }

    body.app-body .link-list-v2::-webkit-scrollbar-thumb {
        background: #7b8794;
        border-radius: 999px;
    }

    body.app-body .doc-row {
        min-height: 42px;
        padding: 11px 12px;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    body.app-body .doc-main {
        min-width: 0;
        flex: 1 1 auto;
        font-size: 13px;
        line-height: 1.25;
    }

    body.app-body .doc-main > i {
        display: none;
    }

    body.app-body .doc-copy {
        min-width: 0;
        width: 100%;
    }

    body.app-body .doc-title {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.app-body .doc-meta {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
    }

    body.app-body .doc-meta i {
        font-size: 14px;
        color: #0f172a;
    }
}

/* =========================================================
   Z-CLOUD Admin V2 - category-focused file manager
   ========================================================= */
.admin-v2-shell {
    padding-bottom: 56px;
}

.admin-v2-hero {
    margin-bottom: 18px;
}

.admin-quick-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-compact-panel,
.workspace-action-card,
.file-editor-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.admin-compact-panel > summary,
.workspace-action-card > summary,
.file-editor-card > summary {
    list-style: none;
}

.admin-compact-panel > summary::-webkit-details-marker,
.workspace-action-card > summary::-webkit-details-marker,
.file-editor-card > summary::-webkit-details-marker {
    display: none;
}

.admin-compact-panel > summary {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
}

.admin-compact-panel > summary > span {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
}

.admin-compact-panel > summary > span > i {
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 18px;
}

.admin-compact-panel > summary strong {
    font-size: 15px;
}

.admin-compact-panel > summary small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.panel-chevron {
    color: var(--muted);
    transition: transform .2s ease;
}

details[open] > summary .panel-chevron {
    transform: rotate(180deg);
}

.admin-compact-body,
.workspace-action-body,
.file-editor-body-v2 {
    border-top: 1px solid var(--border);
    padding: 18px;
    background: #fbfdff;
}

.compact-category-form,
.section-form-v2,
.file-form-v2,
.file-edit-form-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    align-items: end;
}

.compact-category-form .wide-field,
.section-form-v2 .wide-field,
.file-form-v2 .wide-field,
.file-edit-form-v2 .wide-field {
    grid-column: 1 / -1;
}

.compact-category-form > .btn-primary,
.section-form-v2 > .btn-secondary,
.file-form-v2 > .btn-primary,
.file-edit-form-v2 > .btn-secondary {
    width: auto;
    margin: 16px 0 0;
    justify-self: start;
}

.admin-file-manager {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-category-panel,
.admin-category-workspace {
    border: 1px solid rgba(219, 234, 254, .95);
    border-radius: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--shadow-soft);
}

.admin-category-panel {
    position: sticky;
    top: 88px;
    padding: 16px;
    max-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
}

.admin-category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px 14px;
}

.mini-label {
    display: block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
}

.admin-category-panel-head h2,
.workspace-header h2,
.file-list-toolbar h3 {
    margin: 4px 0 0;
    letter-spacing: -.035em;
}

.admin-category-panel-head h2 {
    font-size: 20px;
}

.category-total-badge,
.workspace-file-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 900;
}

.category-total-badge {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
}

.admin-category-filter {
    position: relative;
    margin-bottom: 12px;
}

.admin-category-filter i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.admin-category-filter input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fbff;
    outline: none;
    font-weight: 700;
}

.admin-category-filter input:focus {
    border-color: rgba(37, 99, 235, .55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.admin-category-list {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 7px;
    padding-right: 3px;
}

.admin-category-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 10px 11px;
    border: 1px solid transparent;
    border-radius: 16px;
    color: var(--text);
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.admin-category-item:hover {
    transform: translateX(2px);
    background: #f8fbff;
    border-color: var(--border);
}

.admin-category-item.active {
    background: linear-gradient(135deg, var(--primary-soft), #f0f9ff);
    border-color: var(--border-strong);
    color: var(--primary-dark);
}

.admin-category-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: white;
    border: 1px solid var(--border);
}

.admin-category-item.active .admin-category-icon {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
}

.admin-category-copy {
    min-width: 0;
}

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

.admin-category-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.admin-category-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.admin-category-item > .fa-chevron-right {
    color: #94a3b8;
    font-size: 10px;
}

.admin-category-empty {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 22px 10px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}

.admin-category-workspace {
    min-width: 0;
    padding: 22px;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.workspace-title {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.workspace-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(37, 99, 235, .22);
    font-size: 20px;
}

.workspace-header h2 {
    font-size: 26px;
}

.workspace-header p {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.workspace-file-count {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 15px;
    gap: 5px;
    font-size: 12px;
}

.workspace-file-count strong {
    font-size: 17px;
}

.workspace-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 22px;
}

.workspace-action-card {
    box-shadow: none;
}

.workspace-action-card > summary {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    cursor: pointer;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.workspace-action-card > summary span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.workspace-action-card > summary span > i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
}

.add-file-action-card > summary span > i {
    color: var(--success);
    background: #f0fdf4;
}

.category-danger-zone,
.file-row-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-strong);
}

.row-actions button:disabled {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}

.file-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.file-list-toolbar h3 {
    font-size: 18px;
}

.file-search-v2 {
    width: min(330px, 100%);
}

.file-manager-list {
    display: grid;
    gap: 9px;
}

.file-editor-card {
    box-shadow: none;
    border-radius: 17px;
}

.file-editor-card > summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background .18s ease;
}

.file-editor-card > summary:hover,
.file-editor-card[open] > summary {
    background: #f8fbff;
}

.file-summary-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 17px;
}

.file-summary-copy {
    min-width: 0;
}

.file-summary-copy strong,
.file-summary-copy small {
    display: block;
}

.file-summary-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.file-summary-copy small {
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 7px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.source-badge.hosted {
    color: #166534;
    background: #dcfce7;
}

.source-badge.linked {
    color: #1d4ed8;
    background: #dbeafe;
}

.file-summary-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
}

.icon-action,
.edit-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
}

.icon-action {
    width: 34px;
    color: var(--primary);
    background: var(--primary-soft);
}

.edit-label {
    gap: 6px;
    padding: 0 11px;
    color: var(--primary-dark);
    background: #f1f5f9;
    font-size: 11px;
    font-weight: 900;
}

.file-editor-body-v2 {
    padding: 18px;
}

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

.admin-empty-state {
    display: none;
    place-items: center;
    gap: 8px;
    min-height: 220px;
    padding: 32px;
    border: 1px dashed var(--border-strong);
    border-radius: 18px;
    background: #fbfdff;
    color: var(--muted);
    text-align: center;
}

.admin-empty-state > i {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 20px;
}

.admin-empty-state strong {
    color: var(--text);
    font-size: 17px;
}

.admin-empty-state span {
    font-size: 13px;
}

.workspace-empty {
    min-height: 460px;
}

@media (max-width: 1050px) {
    .admin-file-manager {
        grid-template-columns: 250px minmax(0, 1fr);
    }

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

@media (max-width: 820px) {
    .admin-quick-panels,
    .admin-file-manager {
        grid-template-columns: 1fr;
    }

    .admin-category-panel {
        position: static;
        max-height: none;
    }

    .admin-category-list {
        display: flex;
        overflow-x: auto;
        padding: 1px 1px 8px;
    }

    .admin-category-item {
        flex: 0 0 220px;
    }

    .compact-category-form,
    .section-form-v2,
    .file-form-v2,
    .file-edit-form-v2 {
        grid-template-columns: 1fr;
    }

    .compact-category-form .wide-field,
    .section-form-v2 .wide-field,
    .file-form-v2 .wide-field,
    .file-edit-form-v2 .wide-field {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .admin-category-workspace {
        padding: 16px;
    }

    .workspace-header,
    .file-list-toolbar,
    .file-row-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-file-count {
        align-self: flex-start;
    }

    .file-search-v2 {
        width: 100%;
    }

    .file-editor-card > summary {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 9px;
        padding: 11px;
    }

    .file-summary-icon {
        width: 38px;
        height: 38px;
    }

    .edit-label {
        display: none;
    }

    .admin-compact-panel > summary {
        min-height: 70px;
    }

    .admin-compact-body,
    .workspace-action-body,
    .file-editor-body-v2 {
        padding: 14px;
    }
}

.admin-compact-body .inline-form > input[type="text"] {
    flex: 1 1 auto;
}

.admin-compact-body .inline-form > .btn-primary {
    flex: 0 0 auto;
    width: auto;
    margin-top: 0;
}

@media (max-width: 620px) {
    .admin-compact-body .inline-form > .btn-primary {
        width: 100%;
    }
}

/* =========================================================
   Premium dark glass theme for Admin dashboard
   ========================================================= */
body.admin-v2-body {
    color: #e8f0ff;
    background:
        radial-gradient(circle at 14% 12%, rgba(59, 130, 246, .28), transparent 28%),
        radial-gradient(circle at 88% 6%, rgba(56, 189, 248, .20), transparent 24%),
        radial-gradient(circle at 75% 82%, rgba(99, 102, 241, .16), transparent 30%),
        linear-gradient(180deg, #07111f 0%, #0b1324 45%, #0f1b31 100%);
}

body.admin-v2-body .topbar {
    background: rgba(7, 14, 28, .62);
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    box-shadow: 0 16px 38px rgba(2, 6, 23, .28);
    backdrop-filter: blur(20px);
}

body.admin-v2-body .brand strong,
body.admin-v2-body .workspace-header h2,
body.admin-v2-body .admin-category-panel-head h2,
body.admin-v2-body .file-list-toolbar h3,
body.admin-v2-body .admin-hero h1,
body.admin-v2-body .admin-compact-panel > summary strong,
body.admin-v2-body .file-summary-copy strong,
body.admin-v2-body .workspace-file-count strong,
body.admin-v2-body .stat-card strong,
body.admin-v2-body .admin-empty-state strong {
    color: #f8fbff;
}

body.admin-v2-body .brand small,
body.admin-v2-body .admin-hero p,
body.admin-v2-body .workspace-header p,
body.admin-v2-body .admin-compact-panel > summary small,
body.admin-v2-body .admin-category-copy small,
body.admin-v2-body .file-summary-copy small,
body.admin-v2-body .admin-empty-state,
body.admin-v2-body .mini-label,
body.admin-v2-body .muted {
    color: rgba(214, 227, 255, .68);
}

body.admin-v2-body .admin-hero,
body.admin-v2-body .admin-compact-panel,
body.admin-v2-body .workspace-action-card,
body.admin-v2-body .file-editor-card,
body.admin-v2-body .admin-category-panel,
body.admin-v2-body .admin-category-workspace,
body.admin-v2-body .alert,
body.admin-v2-body .admin-empty-state {
    background: linear-gradient(180deg, rgba(15, 23, 42, .68), rgba(11, 18, 32, .56));
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow:
        0 24px 48px rgba(2, 6, 23, .26),
        inset 0 1px 0 rgba(255, 255, 255, .04);
    backdrop-filter: blur(18px);
}

body.admin-v2-body .admin-compact-body,
body.admin-v2-body .workspace-action-body,
body.admin-v2-body .file-editor-body-v2,
body.admin-v2-body .admin-category-workspace,
body.admin-v2-body .admin-category-panel {
    background: transparent;
}

body.admin-v2-body .admin-compact-body,
body.admin-v2-body .workspace-action-body,
body.admin-v2-body .file-editor-body-v2 {
    border-top: 1px solid rgba(148, 163, 184, .14);
}

body.admin-v2-body .stat-card,
body.admin-v2-body .admin-category-item,
body.admin-v2-body .workspace-file-count,
body.admin-v2-body .source-choice,
body.admin-v2-body .source-choice label,
body.admin-v2-body .icon-action,
body.admin-v2-body .edit-label,
body.admin-v2-body .category-total-badge,
body.admin-v2-body .file-summary-icon,
body.admin-v2-body .workspace-action-card > summary span > i,
body.admin-v2-body .admin-compact-panel > summary > span > i,
body.admin-v2-body .workspace-icon {
    backdrop-filter: blur(14px);
}

body.admin-v2-body .stat-card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(148, 163, 184, .16);
}

body.admin-v2-body .stat-card span {
    color: rgba(214, 227, 255, .64);
}

body.admin-v2-body .eyebrow,
body.admin-v2-body .category-total-badge,
body.admin-v2-body .workspace-file-count,
body.admin-v2-body .source-badge.linked {
    background: rgba(59, 130, 246, .16);
    color: #c9dcff;
    border: 1px solid rgba(96, 165, 250, .22);
}

body.admin-v2-body .source-badge.hosted {
    background: rgba(34, 197, 94, .14);
    color: #c8f7d7;
    border: 1px solid rgba(74, 222, 128, .18);
}

body.admin-v2-body .workspace-icon,
body.admin-v2-body .brand-logo {
    background: linear-gradient(135deg, rgba(37, 99, 235, .88), rgba(14, 165, 233, .88));
    box-shadow: 0 14px 32px rgba(37, 99, 235, .22);
}

body.admin-v2-body .admin-compact-panel > summary > span > i,
body.admin-v2-body .workspace-action-card > summary span > i,
body.admin-v2-body .file-summary-icon,
body.admin-v2-body .admin-category-icon,
body.admin-v2-body .icon-action,
body.admin-v2-body .edit-label {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(148, 163, 184, .16);
    color: #dbe9ff;
}

body.admin-v2-body .add-file-action-card > summary span > i {
    background: rgba(34, 197, 94, .12);
    border-color: rgba(74, 222, 128, .20);
    color: #bbf7d0;
}

body.admin-v2-body .admin-category-item {
    background: rgba(255, 255, 255, .03);
    border-color: rgba(148, 163, 184, .08);
}

body.admin-v2-body .admin-category-item:hover,
body.admin-v2-body .file-editor-card > summary:hover,
body.admin-v2-body .file-editor-card[open] > summary,
body.admin-v2-body .workspace-action-card > summary:hover {
    background: rgba(255, 255, 255, .06);
}

body.admin-v2-body .admin-category-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, .28), rgba(56, 189, 248, .16));
    border-color: rgba(96, 165, 250, .30);
    color: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

body.admin-v2-body .admin-category-item.active .admin-category-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, .95), rgba(14, 165, 233, .92));
    color: #fff;
    border-color: transparent;
}

body.admin-v2-body .panel-chevron,
body.admin-v2-body .admin-category-item > .fa-chevron-right,
body.admin-v2-body .file-summary-actions {
    color: rgba(214, 227, 255, .58);
}

body.admin-v2-body .admin-form label,
body.admin-v2-body .source-choice > span {
    color: #e2ebfb;
}

body.admin-v2-body .input-group input,
body.admin-v2-body .admin-form input,
body.admin-v2-body .admin-form textarea,
body.admin-v2-body .admin-form select,
body.admin-v2-body .search-field input,
body.admin-v2-body .search-panel select,
body.admin-v2-body .admin-search input,
body.admin-v2-body .admin-category-filter input {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(148, 163, 184, .18);
    color: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
}

body.admin-v2-body .input-group input::placeholder,
body.admin-v2-body .admin-form input::placeholder,
body.admin-v2-body .admin-form textarea::placeholder,
body.admin-v2-body .admin-search input::placeholder,
body.admin-v2-body .admin-category-filter input::placeholder {
    color: rgba(214, 227, 255, .42);
}

body.admin-v2-body .input-group input:focus,
body.admin-v2-body .admin-form input:focus,
body.admin-v2-body .admin-form textarea:focus,
body.admin-v2-body .admin-form select:focus,
body.admin-v2-body .admin-search input:focus,
body.admin-v2-body .admin-category-filter input:focus {
    border-color: rgba(96, 165, 250, .46);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

body.admin-v2-body .source-choice {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(148, 163, 184, .16);
}

body.admin-v2-body .source-choice label {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(148, 163, 184, .14);
    color: #dbe9ff;
}

body.admin-v2-body .btn-primary,
body.admin-v2-body .btn-secondary,
body.admin-v2-body .btn-danger,
body.admin-v2-body .btn-ghost,
body.admin-v2-body .nav-pill {
    border: 1px solid rgba(148, 163, 184, .16);
    box-shadow: 0 12px 30px rgba(2, 6, 23, .22);
    backdrop-filter: blur(14px);
}

body.admin-v2-body .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(14, 165, 233, .88));
}

body.admin-v2-body .btn-secondary {
    color: #eaf2ff;
    background: rgba(255, 255, 255, .08);
}

body.admin-v2-body .btn-ghost {
    color: #dbe9ff;
    background: rgba(255, 255, 255, .05);
}

body.admin-v2-body .btn-danger {
    color: #fff2f2;
    background: linear-gradient(135deg, rgba(239, 68, 68, .86), rgba(220, 38, 38, .78));
}

body.admin-v2-body .nav-pill {
    background: rgba(255, 255, 255, .08);
    color: #eef5ff;
}

body.admin-v2-body .nav-pill.admin-pill {
    background: linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(14, 165, 233, .88));
}

body.admin-v2-body .btn-primary:hover,
body.admin-v2-body .btn-secondary:hover,
body.admin-v2-body .btn-danger:hover,
body.admin-v2-body .btn-ghost:hover,
body.admin-v2-body .nav-pill:hover {
    box-shadow: 0 16px 34px rgba(15, 23, 42, .28);
}

body.admin-v2-body .alert.success {
    color: #d5ffe3;
    background: rgba(22, 163, 74, .16);
    border-color: rgba(34, 197, 94, .24);
}

body.admin-v2-body .alert.error {
    color: #ffd6d6;
    background: rgba(220, 38, 38, .15);
    border-color: rgba(248, 113, 113, .22);
}

body.admin-v2-body .alert.warning {
    color: #ffefc2;
    background: rgba(217, 119, 6, .14);
    border-color: rgba(245, 158, 11, .22);
}

body.admin-v2-body .category-danger-zone,
body.admin-v2-body .file-row-footer,
body.admin-v2-body .workspace-header {
    border-color: rgba(148, 163, 184, .14);
}

body.admin-v2-body .admin-empty-state > i {
    background: rgba(59, 130, 246, .14);
    color: #dbe9ff;
}

body.admin-v2-body .admin-search i,
body.admin-v2-body .admin-category-filter i {
    color: rgba(214, 227, 255, .56);
}

body.admin-v2-body .row-actions button:disabled {
    opacity: .38;
}

/* =========================================================
   Z-CLOUD Premium Full-Color Dashboard
   ========================================================= */
body.premium-dashboard-body {
    --premium-bg-1: #06164f;
    --premium-bg-2: #090b38;
    --premium-bg-3: #12083d;
    --premium-cyan: #20d8ff;
    --premium-blue: #2878ff;
    --premium-violet: #7c3cff;
    --premium-pink: #ff4fa3;
    --premium-green: #25c76f;
    color: #f8fbff;
    background:
        radial-gradient(circle at 12% 4%, rgba(31, 132, 255, .42), transparent 25%),
        radial-gradient(circle at 92% 14%, rgba(124, 58, 237, .36), transparent 28%),
        radial-gradient(circle at 72% 70%, rgba(236, 72, 153, .16), transparent 26%),
        linear-gradient(145deg, var(--premium-bg-1) 0%, var(--premium-bg-2) 50%, var(--premium-bg-3) 100%);
    background-attachment: fixed;
}

body.premium-dashboard-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .42;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

body.premium-dashboard-body .topbar {
    background: linear-gradient(90deg, rgba(8, 51, 145, .82), rgba(14, 24, 96, .82), rgba(21, 13, 76, .86));
    border-bottom: 1px solid rgba(96, 165, 250, .25);
    box-shadow: 0 14px 42px rgba(2, 6, 23, .28);
    backdrop-filter: blur(22px);
}

body.premium-dashboard-body .topbar-inner,
body.premium-dashboard-body .page-shell {
    width: min(1440px, calc(100% - 48px));
}

body.premium-dashboard-body .brand {
    color: #fff;
}

body.premium-dashboard-body .brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 17px;
    background: linear-gradient(145deg, #24b7ff, #275dff 58%, #7a35ff);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 14px 34px rgba(18, 111, 255, .38), inset 0 1px 0 rgba(255,255,255,.35);
}

body.premium-dashboard-body .brand strong {
    font-size: 20px;
    color: #fff;
    letter-spacing: -.035em;
}

body.premium-dashboard-body .topbar-search {
    grid-template-columns: minmax(300px, 1fr) 230px;
}

body.premium-dashboard-body .compact-search input,
body.premium-dashboard-body .topbar-search select {
    color: #f8fbff;
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(125, 190, 255, .26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 12px 28px rgba(2,6,23,.18);
    backdrop-filter: blur(18px);
}

body.premium-dashboard-body .compact-search input::placeholder {
    color: rgba(232, 240, 255, .65);
}

body.premium-dashboard-body .compact-search .fa-search,
body.premium-dashboard-body #clearSearch {
    color: #b8d5ff;
}

body.premium-dashboard-body #clearSearch {
    background: rgba(255,255,255,.08);
}

body.premium-dashboard-body .topbar-search select option {
    color: #0f172a;
}

body.premium-dashboard-body .nav-pill {
    color: #fff;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(148, 196, 255, .2);
    box-shadow: 0 12px 28px rgba(2,6,23,.2), inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(16px);
}

body.premium-dashboard-body .admin-pill {
    background: linear-gradient(135deg, #2878ff, #00b8f8);
    border-color: rgba(108, 217, 255, .5);
    box-shadow: 0 14px 32px rgba(21, 122, 255, .35), inset 0 1px 0 rgba(255,255,255,.2);
}

body.premium-dashboard-body .page-shell {
    padding-top: 30px;
}

body.premium-dashboard-body .dashboard-hero {
    grid-template-columns: minmax(0, 1.7fr) minmax(390px, .92fr);
    gap: 22px;
}

body.premium-dashboard-body .dashboard-hero .hero-content,
body.premium-dashboard-body .dashboard-hero .updates-only {
    min-height: 430px;
    border-radius: 30px;
    border: 1px solid rgba(89, 204, 255, .42);
    box-shadow: 0 26px 55px rgba(0, 5, 43, .34), inset 0 1px 0 rgba(255,255,255,.08);
    backdrop-filter: blur(18px);
}

body.premium-dashboard-body .dashboard-hero .hero-content {
    position: relative;
    isolation: isolate;
    padding: 44px 48px;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 30%, rgba(44, 211, 255, .18), transparent 24%),
        radial-gradient(circle at 94% 16%, rgba(255, 93, 214, .35), transparent 18%),
        linear-gradient(135deg, rgba(0, 122, 255, .88), rgba(23, 54, 184, .92) 46%, rgba(105, 32, 211, .9) 76%, rgba(211, 45, 219, .82));
}

body.premium-dashboard-body .dashboard-hero .hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(125deg, transparent 0 54%, rgba(56, 189, 248, .22) 54.5% 55%, transparent 55.5%),
        linear-gradient(125deg, transparent 0 67%, rgba(168, 85, 247, .22) 67.5% 68%, transparent 68.5%);
}

body.premium-dashboard-body .dashboard-hero .hero-content::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 420px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(236, 72, 153, .34), rgba(56, 189, 248, .16) 48%, transparent 72%);
    filter: blur(2px);
}

body.premium-dashboard-body .dashboard-hero .eyebrow {
    position: relative;
    z-index: 2;
    color: #fff;
    background: linear-gradient(90deg, rgba(116, 58, 255, .88), rgba(0, 169, 255, .78));
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 28px rgba(31, 41, 255, .25);
}

body.premium-dashboard-body .dashboard-hero h1 {
    position: relative;
    z-index: 2;
    max-width: 620px;
    color: #fff;
    text-shadow: 0 8px 25px rgba(5, 15, 84, .35);
}

body.premium-dashboard-body .dashboard-hero p {
    position: relative;
    z-index: 2;
    max-width: 620px;
    color: rgba(244, 248, 255, .82);
}

body.premium-dashboard-body .hero-stats {
    position: relative;
    z-index: 4;
    width: min(500px, 64%);
    gap: 14px;
}

body.premium-dashboard-body .hero-stats .stat-card {
    min-height: 98px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 18px 30px rgba(3, 12, 76, .22), inset 0 1px 0 rgba(255,255,255,.1);
    backdrop-filter: blur(16px);
}

body.premium-dashboard-body .hero-stats .stat-category {
    background: linear-gradient(135deg, rgba(4, 126, 255, .74), rgba(0, 194, 255, .18));
}

body.premium-dashboard-body .hero-stats .stat-material {
    background: linear-gradient(135deg, rgba(131, 44, 214, .74), rgba(255, 52, 167, .20));
}

body.premium-dashboard-body .stat-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: linear-gradient(145deg, #1faeff, #1260ff);
    box-shadow: 0 12px 25px rgba(5, 57, 203, .32), inset 0 1px 0 rgba(255,255,255,.2);
    font-size: 20px;
}

body.premium-dashboard-body .stat-material .stat-icon {
    background: linear-gradient(145deg, #c32fff, #8b20d8);
}

body.premium-dashboard-body .stat-copy {
    display: grid;
}

body.premium-dashboard-body .hero-stats .stat-card strong {
    margin: 0;
    color: #fff;
    font-size: 34px;
    line-height: 1;
}

body.premium-dashboard-body .hero-stats .stat-card small {
    margin-top: 5px;
    color: rgba(255,255,255,.82);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.premium-dashboard-body .hero-visual {
    position: absolute;
    z-index: 3;
    right: 28px;
    top: 78px;
    width: 38%;
    height: 300px;
    pointer-events: none;
}

body.premium-dashboard-body .cloud-orbit {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

body.premium-dashboard-body .cloud-mark {
    position: relative;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 180px;
    height: 140px;
    color: #c7edff;
    transform: translateY(-22px);
    filter: drop-shadow(0 20px 26px rgba(13, 24, 166, .45));
}

body.premium-dashboard-body .cloud-mark i {
    position: absolute;
    font-size: 150px;
    background: linear-gradient(145deg, #f4fbff 0%, #74d5ff 38%, #6a6bff 72%, #c960ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,.18);
}

body.premium-dashboard-body .cloud-mark b {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 52px;
    line-height: 1;
    text-shadow: 0 7px 18px rgba(45, 42, 189, .46);
}

body.premium-dashboard-body .cloud-platform {
    position: absolute;
    bottom: 30px;
    width: 220px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(34, 211, 238, .75), rgba(37, 99, 235, .7) 28%, rgba(88, 28, 214, .92) 65%, rgba(236, 72, 153, .75));
    box-shadow: 0 9px 0 rgba(14, 25, 125, .75), 0 18px 0 rgba(46, 17, 116, .7), 0 20px 38px rgba(25, 211, 255, .5), inset 0 5px 16px rgba(255,255,255,.25);
}

body.premium-dashboard-body .orbit-ring {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 1px solid rgba(115, 225, 255, .38);
}

body.premium-dashboard-body .ring-one { width: 290px; height: 85px; }
body.premium-dashboard-body .ring-two { width: 350px; height: 110px; border-color: rgba(221, 95, 255, .26); }

body.premium-dashboard-body .hero-spark {
    position: absolute;
    z-index: 5;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #36e4ff;
    box-shadow: 0 0 16px #36e4ff;
}

body.premium-dashboard-body .spark-one { top: 18%; left: 12%; }
body.premium-dashboard-body .spark-two { top: 4%; right: 10%; width: 18px; height: 18px; background: #e557ff; box-shadow: 0 0 22px #e557ff; }
body.premium-dashboard-body .spark-three { bottom: 26%; left: 5%; width: 6px; height: 6px; }

body.premium-dashboard-body .dashboard-hero .updates-only {
    background:
        radial-gradient(circle at 20% 16%, rgba(64, 112, 255, .18), transparent 28%),
        radial-gradient(circle at 80% 90%, rgba(236, 72, 153, .22), transparent 30%),
        linear-gradient(145deg, rgba(49, 46, 129, .83), rgba(35, 25, 93, .87));
    overflow: hidden;
}

body.premium-dashboard-body .dashboard-hero .updates-card {
    position: relative;
    height: 100%;
    padding: 30px;
    border-radius: 30px;
    background: transparent;
    color: #fff;
}

body.premium-dashboard-body .updates-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

body.premium-dashboard-body .updates-header h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
    color: #fff;
    font-size: 24px;
}

body.premium-dashboard-body .updates-title-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, rgba(31, 150, 255, .9), rgba(82, 69, 255, .85));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 12px 26px rgba(11, 67, 255, .26), inset 0 1px 0 rgba(255,255,255,.18);
}

body.premium-dashboard-body .updates-count {
    padding: 9px 12px;
    border-radius: 999px;
    color: #e9eeff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    font-size: 11px;
    font-weight: 900;
}

body.premium-dashboard-body .updates-list {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 12px;
}

body.premium-dashboard-body .update-item {
    min-height: 68px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 11px 14px;
    border-radius: 18px;
    color: #f8fbff;
    background: rgba(255,255,255,.075);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(14px);
}

body.premium-dashboard-body .update-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 22px rgba(3, 7, 18, .25), inset 0 1px 0 rgba(255,255,255,.2);
}

body.premium-dashboard-body .update-tone-0 .update-icon { background: linear-gradient(145deg, #ff5e99, #e52f73); }
body.premium-dashboard-body .update-tone-1 .update-icon { background: linear-gradient(145deg, #ffbf24, #ff8200); }
body.premium-dashboard-body .update-tone-2 .update-icon { background: linear-gradient(145deg, #63da28, #1fac38); }
body.premium-dashboard-body .update-tone-3 .update-icon { background: linear-gradient(145deg, #24b7ff, #4662ff); }

body.premium-dashboard-body .update-text {
    color: #f7f9ff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

body.premium-dashboard-body .update-arrow {
    color: rgba(255,255,255,.75);
}

body.premium-dashboard-body .updates-dots {
    position: absolute;
    left: 30px;
    bottom: 22px;
    display: flex;
    gap: 8px;
}

body.premium-dashboard-body .updates-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(46, 149, 255, .48);
}

body.premium-dashboard-body .updates-dots span:first-child,
body.premium-dashboard-body .updates-dots span:last-child {
    background: #1ec8ff;
    box-shadow: 0 0 12px rgba(30, 200, 255, .72);
}

body.premium-dashboard-body .updates-only::after {
    content: '';
    position: absolute;
    right: -70px;
    bottom: -80px;
    width: 310px;
    height: 150px;
    transform: rotate(-10deg);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(219, 39, 119, .5), rgba(251, 113, 133, .62), rgba(99, 102, 241, .15));
    filter: blur(8px);
}

body.premium-dashboard-body .section-heading {
    position: relative;
    margin-top: 14px;
    margin-bottom: 22px;
    padding-left: 18px;
}

body.premium-dashboard-body .section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 6px;
    height: 31px;
    border-radius: 999px;
    background: linear-gradient(180deg, #21dcff, #3465ff 55%, #c03bff);
    box-shadow: 0 0 14px rgba(40, 159, 255, .55);
}

body.premium-dashboard-body .section-heading h2 {
    color: #fff;
    font-size: 28px;
}

body.premium-dashboard-body .section-heading p {
    color: rgba(224, 235, 255, .7);
}

body.premium-dashboard-body .grid-v2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

body.premium-dashboard-body .category-card-v2 {
    position: relative;
    isolation: isolate;
    height: 360px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.6);
    box-shadow: 0 22px 48px rgba(1, 8, 48, .28), inset 0 1px 0 rgba(255,255,255,.65);
    transition: transform .22s ease, box-shadow .22s ease;
}

body.premium-dashboard-body .category-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 58px rgba(1, 8, 48, .36), inset 0 1px 0 rgba(255,255,255,.72);
}

body.premium-dashboard-body .category-card-v2::before,
body.premium-dashboard-body .category-card-v2::after {
    content: '';
    position: absolute;
    z-index: -1;
    left: -8%;
    bottom: -42px;
    width: 120%;
    height: 105px;
    border-radius: 48% 54% 0 0;
    opacity: .34;
    transform: rotate(2deg);
}

body.premium-dashboard-body .category-card-v2::after {
    left: 12%;
    bottom: -60px;
    width: 105%;
    height: 120px;
    opacity: .2;
    transform: rotate(-5deg);
}

body.premium-dashboard-body .category-theme-0 { background: linear-gradient(145deg, #f9fcff 0%, #eef6ff 62%, #dcecff 100%); }
body.premium-dashboard-body .category-theme-0::before { background: #47a7ff; }
body.premium-dashboard-body .category-theme-0::after { background: #7ec8ff; }
body.premium-dashboard-body .category-theme-0 .category-icon { background: linear-gradient(145deg, #26afff, #175cff); }
body.premium-dashboard-body .category-theme-0 .item-count { color: #1359d8; background: #dbeafe; }

body.premium-dashboard-body .category-theme-1 { background: linear-gradient(145deg, #fcfaff 0%, #f6efff 62%, #eadbff 100%); }
body.premium-dashboard-body .category-theme-1::before { background: #a66cff; }
body.premium-dashboard-body .category-theme-1::after { background: #d3a8ff; }
body.premium-dashboard-body .category-theme-1 .category-icon { background: linear-gradient(145deg, #bd49ff, #7237ff); }
body.premium-dashboard-body .category-theme-1 .item-count { color: #7c2dd0; background: #efe2ff; }

body.premium-dashboard-body .category-theme-2 { background: linear-gradient(145deg, #f7fffb 0%, #effdf6 62%, #d8f9eb 100%); }
body.premium-dashboard-body .category-theme-2::before { background: #27c98a; }
body.premium-dashboard-body .category-theme-2::after { background: #78dfbb; }
body.premium-dashboard-body .category-theme-2 .category-icon { background: linear-gradient(145deg, #5ee843, #0aa96e); }
body.premium-dashboard-body .category-theme-2 .item-count { color: #087c59; background: #d9f8eb; }

body.premium-dashboard-body .category-theme-3 { background: linear-gradient(145deg, #fffaf4 0%, #fff4e8 62%, #ffe2c3 100%); }
body.premium-dashboard-body .category-theme-3::before { background: #ff9a3d; }
body.premium-dashboard-body .category-theme-3::after { background: #ffc26d; }
body.premium-dashboard-body .category-theme-3 .category-icon { background: linear-gradient(145deg, #ffbe3b, #ff7429); }
body.premium-dashboard-body .category-theme-3 .item-count { color: #b55215; background: #ffead5; }

body.premium-dashboard-body .category-theme-4 { background: linear-gradient(145deg, #fff9fc 0%, #fff0f7 62%, #ffddeb 100%); }
body.premium-dashboard-body .category-theme-4::before { background: #ff5ba7; }
body.premium-dashboard-body .category-theme-4::after { background: #ff9bc8; }
body.premium-dashboard-body .category-theme-4 .category-icon { background: linear-gradient(145deg, #ff6bbb, #dc2a7e); }
body.premium-dashboard-body .category-theme-4 .item-count { color: #b11e68; background: #ffe0ef; }

body.premium-dashboard-body .category-theme-5 { background: linear-gradient(145deg, #f8fbff 0%, #edf3ff 62%, #dce6ff 100%); }
body.premium-dashboard-body .category-theme-5::before { background: #5f73ff; }
body.premium-dashboard-body .category-theme-5::after { background: #9eabff; }
body.premium-dashboard-body .category-theme-5 .category-icon { background: linear-gradient(145deg, #6674ff, #4143d9); }
body.premium-dashboard-body .category-theme-5 .item-count { color: #3f46b8; background: #e2e7ff; }

body.premium-dashboard-body .category-toggle {
    pointer-events: none;
    padding: 22px 22px 14px;
    color: #0f1a34;
    background: transparent;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

body.premium-dashboard-body .category-title-wrap strong {
    color: #0f1a34;
    font-size: 18px;
}

body.premium-dashboard-body .category-title-wrap small {
    color: #687592;
    font-size: 13px;
}

body.premium-dashboard-body .category-icon {
    width: 50px;
    height: 50px;
    border-radius: 17px;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 13px 26px rgba(40, 82, 176, .2), inset 0 1px 0 rgba(255,255,255,.25);
}

body.premium-dashboard-body .item-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

body.premium-dashboard-body .chevron {
    display: none;
}

body.premium-dashboard-body .link-list-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 235px;
    padding: 0 20px 24px;
    overflow-y: auto;
}

body.premium-dashboard-body .doc-row {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 13px;
    color: #14203a;
    background: rgba(255,255,255,.46);
    border: 1px solid rgba(112, 133, 174, .19);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.58);
    backdrop-filter: blur(12px);
}

body.premium-dashboard-body .doc-row:hover {
    background: rgba(255,255,255,.78);
    border-color: rgba(44, 114, 235, .32);
    transform: translateY(-1px);
}

body.premium-dashboard-body .doc-main {
    color: #111c35;
    font-size: 13px;
}

body.premium-dashboard-body .category-theme-0 .doc-main i { color: #1764e8; }
body.premium-dashboard-body .category-theme-1 .doc-main i { color: #843fe1; }
body.premium-dashboard-body .category-theme-2 .doc-main i { color: #0b9c66; }
body.premium-dashboard-body .category-theme-3 .doc-main i { color: #dd731f; }
body.premium-dashboard-body .category-theme-4 .doc-main i { color: #d12f7d; }
body.premium-dashboard-body .category-theme-5 .doc-main i { color: #4b51d6; }

body.premium-dashboard-body .doc-meta {
    color: #34435f;
}

body.premium-dashboard-body .doc-tags {
    display: none;
}

body.premium-dashboard-body .empty-state {
    color: rgba(229, 239, 255, .76);
    background: rgba(255,255,255,.06);
    border-color: rgba(148, 196, 255, .26);
    backdrop-filter: blur(16px);
}

body.premium-dashboard-body .empty-state strong {
    color: #fff;
}

@media (max-width: 1150px) {
    body.premium-dashboard-body .dashboard-hero {
        grid-template-columns: 1fr;
    }

    body.premium-dashboard-body .hero-visual {
        width: 40%;
    }

    body.premium-dashboard-body .grid-v2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    body.premium-dashboard-body .topbar-inner,
    body.premium-dashboard-body .page-shell {
        width: min(100% - 24px, 1440px);
    }

    body.premium-dashboard-body .topbar-search {
        grid-template-columns: 1fr;
    }

    body.premium-dashboard-body .dashboard-hero .hero-content {
        padding: 32px 28px;
    }

    body.premium-dashboard-body .hero-visual {
        opacity: .52;
        right: -15px;
        width: 48%;
    }

    body.premium-dashboard-body .hero-stats {
        width: 65%;
    }
}

@media (max-width: 620px) {
    body.premium-dashboard-body .topbar-inner,
    body.premium-dashboard-body .page-shell {
        width: min(100% - 16px, 1440px);
    }

    body.premium-dashboard-body .dashboard-hero .hero-content,
    body.premium-dashboard-body .dashboard-hero .updates-only {
        min-height: auto;
        border-radius: 23px;
    }

    body.premium-dashboard-body .dashboard-hero h1 {
        max-width: 100%;
        font-size: 36px;
    }

    body.premium-dashboard-body .hero-visual {
        display: none;
    }

    body.premium-dashboard-body .hero-stats {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    body.premium-dashboard-body .hero-stats .stat-card {
        min-height: 84px;
        padding: 13px;
        gap: 10px;
    }

    body.premium-dashboard-body .stat-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    body.premium-dashboard-body .hero-stats .stat-card strong {
        font-size: 26px;
    }

    body.premium-dashboard-body .updates-card {
        padding: 22px !important;
    }

    body.premium-dashboard-body .updates-header {
        align-items: flex-start;
    }

    body.premium-dashboard-body .updates-header h2 {
        font-size: 20px;
    }

    body.premium-dashboard-body .update-item {
        grid-template-columns: 42px minmax(0, 1fr) auto;
    }

    body.premium-dashboard-body .update-icon {
        width: 42px;
        height: 42px;
    }

    body.premium-dashboard-body .grid-v2 {
        grid-template-columns: 1fr;
    }

    body.premium-dashboard-body .category-card-v2 {
        height: 360px;
        border-radius: 22px;
    }
}

body.premium-dashboard-body .dashboard-hero .updates-only {
    position: relative;
    isolation: isolate;
}

body.premium-dashboard-body .dashboard-hero .updates-card {
    z-index: 1;
}

body.premium-dashboard-body .dashboard-hero .updates-only::after {
    z-index: 0;
}


/* Premium dashboard design credit */
body.premium-dashboard-body .premium-credit-footer {
    width: min(1240px, calc(100% - 32px));
    margin: -34px auto 0;
    padding: 28px 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: rgba(224, 234, 255, .62);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
}

body.premium-dashboard-body .premium-credit-footer strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(125, 211, 252, .22);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, .17), rgba(168, 85, 247, .16));
    color: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(15, 23, 42, .16);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

@media (max-width: 560px) {
    body.premium-dashboard-body .premium-credit-footer {
        width: min(100% - 20px, 1240px);
        margin-top: -18px;
        padding-bottom: 26px;
        font-size: 12px;
    }
}
