:root {

    --background:
        #f7f8fa;

    --surface:
        #ffffff;

    --surface-subtle:
        #f3f5f7;

    --border:
        #e2e6ea;

    --border-strong:
        #d2d8de;

    --text:
        #16191d;

    --muted:
        #69717a;

    --quiet:
        #8b939c;

    --primary:
        #1b5cff;

    --primary-hover:
        #164ed8;

    --danger:
        #b42318;

    --danger-background:
        #fff1f0;

    --success:
        #147a48;

    --success-background:
        #edf9f2;

    --radius:
        14px;

    --shadow:
        0 1px 2px rgba(16,24,40,.04),
        0 8px 24px rgba(16,24,40,.05);

}


* {

    box-sizing:
        border-box;

}


html {

    -webkit-font-smoothing:
        antialiased;

}


body {

    margin: 0;

    min-height: 100vh;

    background:
        var(--background);

    color:
        var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height:
        1.5;

}


button,
input,
select {

    font: inherit;

}


button,
a {

    -webkit-tap-highlight-color:
        transparent;

}


a {

    color:
        inherit;

}


.shell {

    width:
        min(
            1120px,
            calc(100% - 40px)
        );

    margin:
        0 auto;

}


.site-header {

    height:
        72px;

    background:
        rgba(
            255,
            255,
            255,
            .92
        );

    border-bottom:
        1px solid
        var(--border);

}


.header-inner {

    height:
        100%;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

}


.brand {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        10px;

    color:
        var(--text);

    font-weight:
        700;

    font-size:
        18px;

    text-decoration:
        none;

}


.brand-mark {

    width:
        32px;

    height:
        32px;

    border-radius:
        9px;

    display:
        grid;

    place-items:
        center;

    background:
        var(--text);

    color:
        white;

    font-size:
        14px;

    font-weight:
        800;

}


.nav-link {

    color:
        #4f5862;

    text-decoration:
        none;

    font-size:
        14px;

    font-weight:
        600;

}


.nav-link:hover {

    color:
        var(--text);

}


.button-reset {

    border: 0;

    background:
        transparent;

    cursor:
        pointer;

}


.site-footer {

    margin-top:
        100px;

    padding:
        30px 0;

    border-top:
        1px solid
        var(--border);

    color:
        var(--quiet);

    font-size:
        13px;

}


.site-footer .shell {

    display:
        flex;

    justify-content:
        space-between;

}


/* ===============================
   Typography
   =============================== */

h1,
h2,
p {

    margin-top:
        0;

}


h1 {

    font-size:
        clamp(
            34px,
            5vw,
            52px
        );

    line-height:
        1.05;

    letter-spacing:
        -.035em;

    margin-bottom:
        18px;

}


h2 {

    font-size:
        18px;

    letter-spacing:
        -.01em;

    margin-bottom:
        5px;

}


p {

    color:
        var(--muted);

}


.lead {

    font-size:
        18px;

    line-height:
        1.65;

}


.lead.compact {

    max-width:
        540px;

}


.eyebrow {

    margin-bottom:
        18px;

    color:
        var(--primary);

    font-size:
        12px;

    font-weight:
        750;

    letter-spacing:
        .11em;

}


/* ===============================
   Buttons
   =============================== */

.button {

    min-height:
        44px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid
        transparent;

    border-radius:
        10px;

    padding:
        10px 16px;

    font-weight:
        650;

    font-size:
        14px;

    text-decoration:
        none;

    cursor:
        pointer;

    transition:
        background .15s,
        border .15s;

}


.button.primary {

    background:
        var(--primary);

    color:
        white;

}


.button.primary:hover {

    background:
        var(--primary-hover);

}


.button.secondary {

    background:
        white;

    border-color:
        var(--border-strong);

    color:
        #333a42;

}


.button.secondary:hover {

    background:
        #f8f9fa;

}


.button.danger {

    background:
        var(--danger-background);

    border-color:
        #ffd5d1;

    color:
        var(--danger);

}


.button.small {

    min-height:
        36px;

    padding:
        7px 12px;

}


.button.full {

    width:
        100%;

}


/* ===============================
   Homepage
   =============================== */

.landing {

    min-height:
        650px;

    display:
        grid;

    grid-template-columns:
        1.1fr
        .9fr;

    align-items:
        center;

    gap:
        100px;

}


.landing-copy {

    max-width:
        600px;

}


.landing-copy .button {

    margin-top:
        12px;

}


.landing-panel {

    padding:
        12px 0;

}


.security-row {

    display:
        grid;

    grid-template-columns:
        48px
        1fr;

    gap:
        18px;

    padding:
        24px 0;

    border-bottom:
        1px solid
        var(--border);

}


.security-row:last-child {

    border-bottom:
        0;

}


.security-icon {

    width:
        44px;

    height:
        44px;

    border:
        1px solid
        var(--border);

    border-radius:
        12px;

    display:
        grid;

    place-items:
        center;

    color:
        var(--quiet);

    font-size:
        11px;

    font-weight:
        750;

}


.security-row strong {

    font-size:
        15px;

}


.security-row p {

    margin:
        4px 0 0;

    font-size:
        14px;

}


/* ===============================
   Public Drop
   =============================== */

.drop-layout {

    width:
        min(
            700px,
            100%
        );

    margin:
        90px auto;

}


.drop-heading {

    margin-bottom:
        36px;

}


.upload-card,
.panel,
.confirmation-card {

    background:
        var(--surface);

    border:
        1px solid
        var(--border);

    border-radius:
        var(--radius);

    box-shadow:
        var(--shadow);

}


.upload-card {

    padding:
        22px;

}


.drop-zone {

    width:
        100%;

    min-height:
        310px;

    border:
        1.5px dashed
        #b8c0c8;

    border-radius:
        12px;

    background:
        #fbfcfd;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    cursor:
        pointer;

    color:
        var(--text);

    transition:
        border-color .15s,
        background .15s;

}


.drop-zone:hover,
.drop-zone.dragging {

    background:
        #f6f8ff;

    border-color:
        var(--primary);

}


.upload-symbol {

    width:
        46px;

    height:
        46px;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid
        var(--border);

    border-radius:
        12px;

    background:
        white;

    font-size:
        20px;

    margin-bottom:
        16px;

}


.drop-title {

    font-weight:
        700;

    font-size:
        16px;

}


.drop-subtitle {

    margin-top:
        5px;

    color:
        var(--quiet);

    font-size:
        13px;

}


.selection {

    display:
        grid;

    gap:
        16px;

}


.selection-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

}


.selection-header strong {

    display:
        block;

}


.selection-header span {

    display:
        block;

    color:
        var(--quiet);

    font-size:
        12px;

    margin-top:
        3px;

}


.text-button {

    border:
        0;

    background:
        transparent;

    color:
        var(--primary);

    font-weight:
        650;

    cursor:
        pointer;

}


.file-list {

    border:
        1px solid
        var(--border);

    border-radius:
        10px;

    overflow:
        hidden;

}


.file-row,
.admin-file {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        15px;

    padding:
        13px 14px;

    border-bottom:
        1px solid
        var(--border);

}


.file-row:last-child,
.admin-file:last-child {

    border-bottom:
        0;

}


.file-info {

    min-width:
        0;

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

}


.file-icon {

    flex:
        0 0 auto;

    width:
        38px;

    height:
        38px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        9px;

    background:
        var(--surface-subtle);

    color:
        #6d7680;

    font-size:
        11px;

    font-weight:
        800;

}


.file-name {

    min-width:
        0;

}


.file-name strong {

    display:
        block;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        14px;

}


.file-name span {

    display:
        block;

    color:
        var(--quiet);

    font-size:
        12px;

    margin-top:
        2px;

}


.remove-file {

    flex:
        0 0 auto;

    width:
        32px;

    height:
        32px;

    border:
        0;

    border-radius:
        8px;

    background:
        transparent;

    color:
        #7e8790;

    font-size:
        20px;

    cursor:
        pointer;

}


.remove-file:hover {

    background:
        var(--surface-subtle);

}


.progress-area {

    padding:
        12px 4px;

}


.progress-top {

    display:
        flex;

    justify-content:
        space-between;

    margin-bottom:
        12px;

    font-size:
        14px;

}


.progress-track {

    height:
        7px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        #e9edf1;

}


.progress-bar {

    width:
        0;

    height:
        100%;

    background:
        var(--primary);

    transition:
        width .1s linear;

}


.progress-area p {

    margin:
        10px 0 0;

    font-size:
        12px;

}


.result {

    display:
        flex;

    gap:
        14px;

    align-items:
        flex-start;

    padding:
        16px;

    border-radius:
        10px;

}


.result.success {

    background:
        var(--success-background);

    color:
        var(--success);

}


.result.error {

    background:
        var(--danger-background);

    color:
        var(--danger);

}


.result-icon {

    width:
        28px;

    height:
        28px;

    flex:
        0 0 auto;

    display:
        grid;

    place-items:
        center;

    border-radius:
        50%;

    border:
        1px solid
        currentColor;

    font-weight:
        800;

}


.result p {

    color:
        inherit;

    margin:
        3px 0 0;

    font-size:
        13px;

}


.privacy-note {

    display:
        flex;

    gap:
        11px;

    margin-top:
        18px;

    padding:
        14px;

    background:
        var(--surface-subtle);

    border-radius:
        10px;

}


.privacy-note p {

    margin:
        0;

    font-size:
        12px;

}


.privacy-icon {

    flex:
        0 0 auto;

    width:
        20px;

    height:
        20px;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid
        #adb5bd;

    border-radius:
        50%;

    color:
        #727b84;

    font-size:
        11px;

    font-weight:
        700;

}


/* ===============================
   Dashboard
   =============================== */

.dashboard-header,
.detail-header {

    margin:
        70px 0 35px;

}


.dashboard-header h1,
.detail-header h1 {

    font-size:
        40px;

}


.dashboard-header p,
.detail-header p {

    margin-bottom:
        0;

}


.dashboard-grid {

    display:
        grid;

    grid-template-columns:
        340px
        1fr;

    gap:
        22px;

    align-items:
        start;

}


.panel {

    overflow:
        hidden;

}


.panel-header {

    padding:
        20px 22px;

    border-bottom:
        1px solid
        var(--border);

}


.panel-header p {

    margin:
        0;

    font-size:
        13px;

}


.form-stack {

    display:
        grid;

    gap:
        17px;

    padding:
        22px;

}


label > span {

    display:
        block;

    margin-bottom:
        7px;

    font-size:
        13px;

    font-weight:
        650;

}


input,
select {

    width:
        100%;

    height:
        44px;

    border:
        1px solid
        var(--border-strong);

    border-radius:
        9px;

    background:
        white;

    color:
        var(--text);

    padding:
        0 12px;

    outline:
        none;

}


input:focus,
select:focus {

    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(27,92,255,.10);

}


.drop-list {

    display:
        grid;

}


.dashboard-drop {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    padding:
        17px 20px;

    border-bottom:
        1px solid
        var(--border);

    text-decoration:
        none;

}


.dashboard-drop:last-child {

    border-bottom:
        0;

}


.dashboard-drop:hover {

    background:
        #fafbfc;

}


.drop-main {

    min-width:
        0;

    display:
        flex;

    align-items:
        center;

    gap:
        13px;

}


.drop-icon {

    width:
        38px;

    height:
        38px;

    flex:
        0 0 auto;

    display:
        grid;

    place-items:
        center;

    border-radius:
        9px;

    background:
        #edf2ff;

    color:
        var(--primary);

    font-weight:
        800;

}


.drop-main strong {

    display:
        block;

    overflow:
        hidden;

    white-space:
        nowrap;

    text-overflow:
        ellipsis;

    font-size:
        14px;

}


.drop-main span {

    display:
        block;

    margin-top:
        3px;

    color:
        var(--quiet);

    font-size:
        12px;

}


.drop-status {

    display:
        flex;

    align-items:
        center;

    gap:
        12px;

}


.badge {

    padding:
        4px 8px;

    border-radius:
        999px;

    font-size:
        11px;

    font-weight:
        700;

}


.badge.active {

    background:
        #edf9f2;

    color:
        #147a48;

}


.badge.revoked,
.badge.expired {

    background:
        #f1f3f5;

    color:
        #6d7680;

}


.chevron {

    color:
        #a2a9b0;

    font-size:
        23px;

}


.empty-state {

    padding:
        65px 25px;

    text-align:
        center;

}


.empty-icon {

    width:
        44px;

    height:
        44px;

    margin:
        0 auto 14px;

    display:
        grid;

    place-items:
        center;

    border:
        1px solid
        var(--border);

    border-radius:
        12px;

    color:
        var(--quiet);

}


.empty-state p {

    margin:
        5px 0 0;

    font-size:
        13px;

}


/* ===============================
   Drop detail
   =============================== */

.detail-header {

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        25px;

}


.back-link {

    display:
        inline-block;

    margin-bottom:
        22px;

    color:
        var(--muted);

    font-size:
        13px;

    font-weight:
        600;

    text-decoration:
        none;

}


.admin-file-list {

    display:
        grid;

}


.admin-file {

    padding:
        15px 20px;

}


/* ===============================
   Confirmation
   =============================== */

.center-page {

    min-height:
        650px;

    display:
        grid;

    place-items:
        center;

}


.confirmation-card {

    width:
        min(
            600px,
            100%
        );

    padding:
        38px;

}


.confirmation-card h1 {

    font-size:
        34px;

}


.confirmation-icon,
.unavailable-icon {

    width:
        48px;

    height:
        48px;

    display:
        grid;

    place-items:
        center;

    margin-bottom:
        25px;

    border-radius:
        50%;

    background:
        var(--success-background);

    color:
        var(--success);

    font-size:
        20px;

    font-weight:
        800;

}


.unavailable-icon {

    background:
        var(--surface-subtle);

    color:
        var(--quiet);

}


.copy-field {

    display:
        grid;

    grid-template-columns:
        1fr auto;

    gap:
        9px;

    margin:
        25px 0;

}


.notice {

    margin:
        24px 0;

    padding:
        15px;

    border-radius:
        10px;

    background:
        var(--surface-subtle);

}


.notice strong {

    font-size:
        13px;

}


.notice p {

    margin:
        4px 0 0;

    font-size:
        12px;

}


/* ===============================
   Utilities
   =============================== */

.hidden {

    display:
        none !important;

}


/* ===============================
   Mobile
   =============================== */

@media (
    max-width: 800px
) {

    .shell {

        width:
            min(
                100% - 28px,
                1120px
            );

    }


    .landing {

        min-height:
            auto;

        grid-template-columns:
            1fr;

        gap:
            50px;

        padding:
            80px 0;

    }


    .landing-panel {

        padding:
            0;

    }


    .drop-layout {

        margin:
            55px auto;

    }


    .upload-card {

        padding:
            16px;

    }


    .drop-zone {

        min-height:
            260px;

    }


    .dashboard-header,
    .detail-header {

        margin-top:
            45px;

    }


    .dashboard-grid {

        grid-template-columns:
            1fr;

    }


    .detail-header {

        align-items:
            flex-start;

        flex-direction:
            column;

    }


    .dashboard-drop {

        padding:
            15px;

    }


    .badge {

        display:
            none;

    }


    .confirmation-card {

        padding:
            25px;

    }


    .site-footer .shell {

        gap:
            10px;

        flex-direction:
            column;

    }

}

.header-account {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.header-account form {
    margin: 0;
}


/* ==========================================================
   Dropfile v1.1
   Dark-first appearance + admin media viewer
   ========================================================== */

html {
    color-scheme: dark;
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0d1014;
    --background: #0d1014;
    --surface: #15191f;
    --surface-raised: #1b2027;
    --card: #15191f;
    --text: #f1f4f8;
    --foreground: #f1f4f8;
    --muted: #9ba6b2;
    --border: #2b323c;
    --input: #11151a;
}

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f7f8fa;
    --background: #f7f8fa;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --card: #ffffff;
    --text: #171a1f;
    --foreground: #171a1f;
    --muted: #66717f;
    --border: #dde2e8;
    --input: #ffffff;
}

html[data-theme="dark"] body {
    background: #0d1014;
    color: #f1f4f8;
}

html[data-theme="dark"] .site-header {
    background: rgba(13, 16, 20, 0.92);
    border-color: #262c34;
}

html[data-theme="dark"] .site-footer {
    border-color: #262c34;
    color: #9ba6b2;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-file,
html[data-theme="dark"] .media-card,
html[data-theme="dark"] .empty-state {
    background: #15191f;
    border-color: #2b323c;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #101419;
    border-color: #303843;
    color: #f1f4f8;
}

html[data-theme="dark"] input::placeholder {
    color: #747f8b;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .media-card-name {
    color: #f1f4f8;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .media-card-meta,
html[data-theme="dark"] .security-note {
    color: #9ba6b2;
}

html[data-theme="light"] body {
    background: #f7f8fa;
    color: #171a1f;
}

html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.94);
    border-color: #e2e6eb;
}

html[data-theme="light"] .panel,
html[data-theme="light"] .admin-file,
html[data-theme="light"] .media-card,
html[data-theme="light"] .empty-state {
    background: #ffffff;
    border-color: #dde2e8;
}

.global-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    appearance: none;
    border: 1px solid var(--border, #303843);
    background: transparent;
    color: inherit;
    border-radius: 9px;
    padding: 8px 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.theme-toggle:hover {
    background: rgba(127, 127, 127, 0.09);
}

.drop-link-panel {
    margin-bottom: 22px;
}

.copy-link-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.drop-link-input {
    min-width: 0;
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
                 Consolas, monospace;
    font-size: 13px;
}

.security-note {
    margin: 10px 0 0;
    font-size: 12px;
}

.legacy-link-note {
    border: 1px solid var(--border, #303843);
    border-radius: 10px;
    padding: 16px;
}

.legacy-link-note p {
    margin-bottom: 0;
}

.files-panel {
    margin-top: 22px;
}

.access-panel {
    margin-top: 22px;
}

.media-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.media-card {
    overflow: hidden;
    border: 1px solid var(--border, #2b323c);
    border-radius: 13px;
}

.media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #090b0e;
}

.media-preview a {
    display: block;
    width: 100%;
    height: 100%;
}

.media-preview img,
.media-preview video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #090b0e;
}

.generic-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #8d98a5;
}

.media-card-body {
    padding: 14px;
}

.media-card-name {
    overflow: hidden;
    margin-bottom: 5px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card-meta {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

@media (max-width: 640px) {
    .copy-link-row {
        align-items: stretch;
        flex-direction: column;
    }

    .copy-link-row .button {
        width: 100%;
    }

    .global-header-actions {
        gap: 7px;
    }

    .theme-toggle {
        padding: 7px 9px;
        font-size: 12px;
    }

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