:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --text: #182233;
    --muted: #667085;
    --line: #e5eaf1;
    --teal: #16b8a5;
    --teal-dark: #08796f;
    --amber: #e6a93e;
    --rose: #e8566d;
    --green: #30b981;
    --ink: #06110f;
    --radius: 8px;
    --button-radius: 7px;
    --section-spacing: 52px;
    --soft-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}

body {
    font-size: 15px;
    line-height: 1.45;
}

.site-body,
.admin-body {
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0, rgba(22, 184, 165, .16), transparent 280px),
        linear-gradient(180deg, #fbfdff 0, #f4f7fb 360px),
        var(--bg);
}

.site-header,
.site-footer,
.site-main {
    width: min(1120px, calc(100% - 36px));
}

.site-header {
    min-height: 72px;
}

.brand,
.admin-brand {
    gap: 10px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    color: #06231f;
    background: linear-gradient(135deg, #31dac8, #15b69e);
    box-shadow: 0 10px 22px rgba(22, 184, 165, .24);
}

.brand strong,
.admin-brand strong {
    color: var(--text);
    font-size: 16px;
}

.brand small,
.admin-brand small {
    color: var(--muted);
    font-size: 12px;
}

.site-nav {
    gap: 4px;
}

.site-nav a {
    min-height: 38px;
    padding: 8px 11px;
    color: #475467;
}

.site-nav a:hover,
.site-nav .nav-avatar-link:hover {
    color: var(--text);
    background: #eaf7f5;
}

.site-main {
    padding: 22px 0 48px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--teal-dark);
    font-size: 11px;
    letter-spacing: .03em;
}

.upload-hero {
    min-height: auto;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 500px);
    gap: 24px;
    padding: 26px 0 10px;
}

.hero-copy h1,
.account-head h1,
.share-header h1 {
    color: #111827;
    font-size: clamp(30px, 4.4vw, 52px);
    line-height: 1.04;
}

.hero-text {
    max-width: 560px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.hero-facts span,
.share-badges span,
.profile-state-pill,
.user-modal-meta span {
    min-height: 32px;
    padding: 6px 10px;
    color: #344054;
    background: #ffffff;
    border-color: var(--line);
}

.upload-panel,
.login-card,
.panel,
.file-table-card,
.share-link-panel,
.access-panel,
.metric-card,
.profile-identity-panel,
.profile-settings-panel,
.modal-card {
    color: var(--text);
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.upload-panel,
.login-card,
.panel,
.file-table-card,
.share-link-panel {
    padding: 16px;
}

.drop-zone {
    min-height: 210px;
    gap: 7px;
    color: var(--text);
    background: linear-gradient(180deg, #f7fdfc, #eefaf8);
    border-color: rgba(22, 184, 165, .45);
}

.drop-zone i {
    color: var(--teal);
    font-size: 34px;
}

.drop-zone span,
.muted,
.file-list.empty,
.metric-card span,
.metric-card small,
.meta-grid span,
.modal-message-text {
    color: var(--muted);
}

.file-list,
.upload-options,
.upgrade-note,
.option-note,
.meta-grid > div,
.settings-section,
.subtab-panel,
.event-row,
.code-block {
    color: var(--text);
    background: #f8fafc;
    border-color: var(--line);
}

input,
textarea,
select {
    min-height: 40px;
    color: var(--text);
    background: #ffffff;
    border-color: #d8e0ea;
    border-radius: var(--button-radius);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(22, 184, 165, .24);
    border-color: rgba(22, 184, 165, .62);
}

.primary-button,
.small-button,
.icon-button {
    min-height: 38px;
    border-radius: var(--button-radius);
    transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.primary-button {
    padding: 11px 14px;
    color: #06231f;
    background: linear-gradient(135deg, #31dac8, #16b8a5);
    font-weight: 850;
    box-shadow: 0 10px 22px rgba(22, 184, 165, .22);
}

.small-button {
    padding: 8px 10px;
    color: #0f766e;
    background: #eefaf8;
    border-color: rgba(22, 184, 165, .28);
}

.icon-button {
    width: 36px;
    height: 36px;
    color: #344054;
    background: #f8fafc;
    border-color: var(--line);
}

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

.primary-button:disabled {
    color: #64748b;
    background: #dbe5e9;
    box-shadow: none;
}

.small-button.danger,
.primary-button.danger {
    color: #9f1239;
    background: #fff1f3;
    border-color: rgba(232, 86, 109, .34);
    box-shadow: none;
}

.icon-button.danger,
.danger {
    color: #be123c;
}

.section-head,
.share-header,
.account-head,
.admin-topbar {
    gap: 14px;
    margin-bottom: 14px;
}

.section-head h2,
.access-panel h2,
.modal-head h2,
.profile-settings-head h2 {
    color: #111827;
    font-size: 22px;
    line-height: 1.15;
}

.metric-grid {
    gap: 12px;
}

.metric-card {
    padding: 14px;
}

.metric-card strong {
    margin: 6px 0 3px;
    color: #111827;
    font-size: 23px;
    line-height: 1.1;
}

.responsive-table {
    border-radius: var(--radius);
}

table {
    color: var(--text);
    font-size: 14px;
}

th,
td {
    padding: 10px 9px;
    border-color: var(--line);
}

th {
    color: #667085;
    font-size: 11px;
}

code {
    color: #0f766e;
}

.notice.success {
    color: #065f46;
    background: #ecfdf3;
    border-color: #b7e9cd;
}

.notice.danger {
    color: #9f1239;
    background: #fff1f3;
    border-color: #fecdd3;
}

.admin-body {
    background: #eef3f8;
}

.admin-shell {
    grid-template-columns: 252px minmax(0, 1fr);
}

.admin-sidebar {
    padding: 18px;
    color: #c7d2e1;
    background: linear-gradient(180deg, #172033, #111827);
    border-right: 0;
    box-shadow: 12px 0 32px rgba(15, 23, 42, .08);
}

.admin-sidebar .brand-mark {
    box-shadow: none;
}

.admin-sidebar .admin-brand strong {
    color: #ffffff;
}

.admin-sidebar .admin-brand small,
.admin-sidebar-footer a,
.admin-nav a {
    color: #b7c4d6;
}

.admin-menu {
    min-height: calc(100vh - 78px);
}

.admin-nav {
    gap: 5px;
    margin-top: 26px;
}

.admin-nav a,
.admin-sidebar-footer a {
    min-height: 39px;
    padding: 9px 10px;
    border-radius: var(--button-radius);
}

.admin-nav a.active,
.admin-nav a:hover,
.admin-sidebar-footer a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, .11);
}

.admin-main {
    padding: 22px;
}

.admin-topbar {
    min-height: 58px;
}

.admin-topbar h1 {
    color: #111827;
    font-size: 30px;
}

.admin-user {
    min-height: 38px;
    padding: 7px 11px;
    color: #344054;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.tab-list,
.subtab-list {
    gap: 5px;
    padding: 5px;
    background: #eef3f8;
}

.tab-button,
.subtab-button {
    min-height: 36px;
    padding: 7px 10px;
    color: #475467;
    font-size: 13px;
}

.tab-button:hover,
.subtab-button:hover,
.tab-button.is-active,
.subtab-button.is-active {
    color: #0f766e;
    background: #ffffff;
}

.settings-section > summary {
    min-height: 42px;
    padding: 10px 12px;
}

.form-grid,
.option-grid {
    gap: 10px;
}

.profile-console {
    gap: 14px;
}

.profile-identity-panel,
.profile-settings-panel {
    padding: 16px;
}

.profile-avatar-button {
    color: #0f172a;
    background: linear-gradient(145deg, #dffbf7, #ffffff);
    box-shadow: 0 14px 30px rgba(22, 184, 165, .18);
}

.profile-avatar-button--compact {
    width: 82px;
    height: 82px;
}

.profile-identity-copy h1 {
    color: #111827;
    font-size: clamp(26px, 3vw, 34px);
}

.profile-facts dt {
    color: #667085;
}

.profile-facts dd {
    color: #182233;
}

.profile-setting-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 0;
}

.profile-setting-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-setting-icon {
    width: 40px;
    height: 40px;
    color: #0f766e;
    background: #e7f8f5;
    font-size: 18px;
}

.profile-setting-meta .small-button {
    color: #0f766e;
    background: #eefaf8;
    border-color: rgba(22, 184, 165, .34);
}

.app-modal {
    width: min(660px, calc(100vw - 32px));
}

.app-modal::backdrop {
    background: rgba(15, 23, 42, .45);
}

.modal-card {
    padding: 18px;
    background: #ffffff;
}

.confirm-card .modal-message-text {
    color: #9f1239;
    background: #fff1f3;
}

.trust-band {
    margin-top: 14px;
}

.trust-band > div {
    padding: 14px;
    background: #ffffff;
}

.site-footer {
    color: #667085;
}

.legal-page {
    padding: clamp(28px, 6vw, 78px) 0;
}

.legal-shell {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: clamp(24px, 5vw, 52px);
    background: #ffffff;
    border: 1px solid #e4e9f2;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.legal-shell h1 {
    margin: 0 0 22px;
    color: #111827;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.04;
}

.legal-content {
    color: #344054;
    font-size: 1rem;
    line-height: 1.75;
}

@media (max-width: 920px) {
    .site-header,
    .site-footer,
    .site-main {
        width: min(100% - 28px, 1120px);
    }

    .site-nav,
    .admin-menu {
        padding-top: 82px;
    }

    .site-nav:not(.is-open),
    .admin-menu:not(.is-open) {
        display: none;
    }

    .site-nav.is-open {
        display: grid;
        align-content: start;
        width: min(100% - 28px, 380px);
        height: auto;
        max-height: calc(100dvh - 28px);
        inset: 14px 14px auto auto;
        padding: 74px 14px 14px;
        overflow-y: auto;
        background: rgba(255, 255, 255, .96);
        border: 1px solid rgba(16, 24, 40, .08);
        border-radius: 18px;
        box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
    }

    .admin-menu.is-open {
        display: grid;
        background: rgba(17, 24, 39, .94);
    }

    .site-nav a {
        color: #344054;
        min-height: 46px;
        padding: 10px 12px;
        background: #f8fafc;
        border-color: #e4e9f2;
        box-shadow: none;
    }

    .upload-hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
        padding-top: 10px;
        align-items: stretch;
    }

    .hero-copy,
    .upload-panel {
        min-width: 0;
        width: 100%;
    }

    .hero-text {
        max-width: none;
    }

    .hero-facts {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .hero-facts span {
        justify-content: center;
        min-width: 0;
        text-align: center;
        line-height: 1.25;
        white-space: normal;
    }

    .admin-sidebar {
        background: linear-gradient(180deg, #172033, #111827);
    }

    .admin-main {
        padding: 16px;
    }

    .profile-setting-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .profile-setting-meta {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 14px;
    }

    .hero-copy h1,
    .account-head h1,
    .share-header h1 {
        font-size: 30px;
        line-height: 1.08;
    }

    .hero-text {
        margin: 12px 0 14px;
        font-size: 15px;
        line-height: 1.55;
    }

    .upload-hero {
        gap: 14px;
        padding-top: 4px;
    }

    .upload-panel,
    .panel,
    .login-card,
    .file-table-card,
    .share-link-panel {
        padding: 12px;
    }

    .drop-zone {
        min-height: 184px;
    }

    .file-list,
    .upgrade-note {
        padding: 12px;
    }

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

    .hero-facts span {
        justify-content: flex-start;
        text-align: left;
    }

    .trust-band {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 18px;
    }

    .trust-band > div {
        padding: 14px;
    }

    .site-footer {
        display: grid;
        justify-items: start;
        gap: 10px;
        padding-bottom: 24px;
    }

    .site-footer span:last-child {
        justify-content: flex-start;
    }
}
