:root {
    color-scheme: dark;

    --bg: #04070a;
    --bg-2: #080d11;

    --panel: rgba(8, 13, 17, .91);
    --panel-strong: rgba(10, 15, 20, .98);

    --line: rgba(174, 151, 101, .23);
    --line-soft: rgba(174, 151, 101, .09);
    --line-bright: rgba(215, 168, 95, .48);

    --amber: #d7a85f;
    --amber-soft: #92754a;

    --text: #d7d2c8;
    --muted: #726d64;

    --green: #76916f;
    --red: #ad6969;

    font-family:
        "Courier New",
        Courier,
        monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 100%;
    min-height: 100%;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 52% 42%,
            rgba(45, 61, 71, .12),
            transparent 34%
        ),
        linear-gradient(
            rgba(142, 125, 86, .035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(142, 125, 86, .035) 1px,
            transparent 1px
        ),
        linear-gradient(
            180deg,
            #04070a,
            #070c11 52%,
            #020406
        );

    background-size:
        auto,
        34px 34px,
        34px 34px,
        auto;

    color: var(--text);
}

/* lower-left planet */
body::before {
    content: "";

    position: fixed;

    left: -18vw;
    bottom: -42vw;

    width: min(62vw, 900px);
    height: min(62vw, 900px);

    border-radius: 50%;

    background:
        repeating-radial-gradient(
            ellipse,
            transparent 0 35px,
            rgba(188, 157, 101, .045) 36px 37px
        ),
        repeating-linear-gradient(
            8deg,
            transparent 0 53px,
            rgba(188, 157, 101, .032) 54px 55px
        ),
        radial-gradient(
            circle at 34% 27%,
            rgba(95, 111, 118, .19),
            transparent 30%
        ),
        radial-gradient(
            circle at 58% 48%,
            rgba(44, 61, 70, .25),
            transparent 54%
        ),
        radial-gradient(
            circle at 75% 76%,
            #05090c,
            #020405 68%
        );

    border: 1px solid rgba(174, 151, 101, .15);

    box-shadow:
        inset -70px -55px 160px rgba(0, 0, 0, .85),
        0 0 90px rgba(61, 80, 90, .04);

    pointer-events: none;
    z-index: 0;
}

/* upper-right satellite geometry */
body::after {
    content: "";

    position: fixed;

    top: 7vh;
    right: 8vw;

    width: 220px;
    height: 104px;

    border: 1px solid rgba(183, 151, 94, .2);

    background:
        linear-gradient(
            90deg,
            transparent 0 14%,
            rgba(16, 23, 28, .78) 14% 86%,
            transparent 86%
        );

    box-shadow:
        -84px 0 0 -83px rgba(183, 151, 94, .58),
        84px 0 0 -83px rgba(183, 151, 94, .58);

    transform:
        rotate(-8deg)
        skewX(-6deg);

    opacity: .5;
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.page {
    width: 100%;
    min-height: 100vh;
    padding: 22px;
    position: relative;
    z-index: 1;
}

#appView {
    position: relative;

    width: min(1500px, calc(100% - 10px));
    min-height: calc(100vh - 44px);

    margin: 0 auto;

    padding: 26px 28px 28px;

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

    background:
        linear-gradient(
            180deg,
            rgba(8, 13, 17, .92),
            rgba(4, 8, 11, .96)
        );

    box-shadow:
        0 25px 80px rgba(0, 0, 0, .5);

    overflow: auto;
}

#appView::before,
#appView::after {
    content: "";
    position: absolute;

    width: 18px;
    height: 18px;

    border-color: var(--amber-soft);
    border-style: solid;

    pointer-events: none;
}

#appView::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

#appView::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 2px 2px 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 20px;

    border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
    color: var(--amber-soft);

    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.topbar h1 {
    margin: 7px 0 5px;

    color: var(--amber);

    font-size: 24px;
    font-weight: 400;
    letter-spacing: .14em;
}

.muted {
    color: var(--muted);
}

#identity {
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.home-button,
button,
.upload-button {
    border:
        1px solid var(--line);

    background:
        rgba(10, 15, 19, .92);

    color: var(--text);

    padding: 9px 13px;

    text-decoration: none;

    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;

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

.home-button:hover,
button:hover,
.upload-button:hover {
    border-color: var(--line-bright);

    color: var(--amber);

    background:
        rgba(23, 26, 27, .9);
}

.main-tabs {
    display: flex;
    gap: 4px;

    padding: 18px 0 0;
}

.main-tab {
    min-width: 112px;

    border-color:
        transparent
        transparent
        var(--line-soft)
        transparent;

    background:
        transparent;

    color: var(--muted);
}

.main-tab.active {
    border-color:
        var(--line-bright)
        var(--line-bright)
        transparent
        var(--line-bright);

    color: var(--amber);

    background:
        rgba(20, 23, 24, .72);
}

.storage-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 15px 0;

    border-bottom:
        1px solid var(--line-soft);
}

.storage-tabs {
    display: flex;
    gap: 4px;
}

.storage-tab {
    min-width: 105px;
}

.storage-tab.active {
    border-color: var(--line-bright);
    color: var(--amber);
    background: rgba(25, 25, 21, .82);
}

.preview-switch {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    color: var(--muted);

    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;

    cursor: pointer;
}

.preview-switch input {
    accent-color: var(--amber);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 6px;

    margin-top: 14px;
    padding: 8px 10px;

    min-height: 39px;

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

    background:
        rgba(2, 6, 9, .74);
}

.crumb {
    padding: 6px 8px;

    border-color: transparent;

    background: transparent;

    color: var(--amber-soft);

    font-size: 9px;
}

.crumb:hover {
    border-color: var(--line);
    color: var(--amber);
}

.crumb.active {
    color: var(--amber);
}

.crumb-separator {
    color: #4e4a43;
}

.file-panel,
.action-panel {
    margin-top: 14px;

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

    background:
        rgba(5, 10, 14, .68);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 16px;

    border-bottom:
        1px solid var(--line-soft);
}

.panel-title,
.operation-label {
    color: var(--muted);

    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.location-label {
    margin-top: 5px;

    color: var(--amber);

    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.status {
    color: var(--muted);

    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.file-list {
    display: flex;
    flex-direction: column;
}

.file-row {
    display: grid;

    grid-template-columns:
        128px
        minmax(180px, 1fr)
        auto;

    gap: 16px;

    align-items: center;

    min-height: 110px;

    padding: 12px 14px;

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

    background:
        rgba(4, 8, 11, .56);

    transition:
        background .14s ease,
        border-color .14s ease;
}

.file-row:last-child {
    border-bottom: 0;
}

.file-row:hover {
    background:
        rgba(18, 22, 24, .7);

    border-color:
        var(--line);
}

.media-preview {
    position: relative;

    width: 116px;
    height: 82px;

    overflow: hidden;

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

    background:
        #05090c;
}

.media-preview img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.preview-placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color: #555148;

    font-size: 14px;
    letter-spacing: .15em;
}

.preview-play {
    position: absolute;

    left: 50%;
    bottom: 6px;

    transform: translateX(-50%);

    padding: 6px 8px;

    border-color:
        rgba(215, 168, 95, .46);

    background:
        rgba(2, 5, 7, .88);

    color: var(--amber);

    font-size: 8px;
}

.file-details {
    min-width: 0;
}

.file-name {
    overflow: hidden;

    color: var(--text);

    font-size: 13px;

    letter-spacing: .04em;

    text-overflow: ellipsis;

    white-space: nowrap;
}

.file-meta {
    margin-top: 9px;

    color: var(--muted);

    font-size: 9px;

    letter-spacing: .08em;

    text-transform: uppercase;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 5px;
}

.file-actions button {
    padding: 7px 9px;

    font-size: 8px;
}

.file-actions .primary {
    border-color: var(--line-bright);
    color: var(--amber);
}

.file-actions .danger {
    color: var(--red);
}

.empty-state {
    padding: 60px 20px;

    text-align: center;
}

.empty-title {
    margin-bottom: 8px;

    color: var(--amber-soft);

    font-size: 11px;
    letter-spacing: .14em;
}

.action-panel {
    padding: 20px;
}

.action-location {
    margin-top: 8px;

    color: var(--muted);

    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.action-location strong {
    color: var(--amber);
    font-weight: 400;
}

.operation-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

    margin-top: 22px;
}

.operation-card {
    min-height: 200px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 20px;

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

    background:
        linear-gradient(
            145deg,
            rgba(13, 18, 22, .9),
            rgba(6, 10, 13, .88)
        );
}

.operation-card h2 {
    margin: 10px 0;

    color: var(--amber);

    font-size: 17px;
    font-weight: 400;

    letter-spacing: .1em;
}

.operation-card p {
    margin: 0 0 20px;

    max-width: 460px;

    color: var(--muted);

    font-size: 10px;
    line-height: 1.6;
}

.operation-card .primary,
.upload-button {
    margin-top: auto;

    border-color: var(--line-bright);
    color: var(--amber);
}

.upload-button {
    display: inline-block;
}

.operation-status {
    min-height: 22px;

    margin-top: 16px;

    color: var(--green);

    font-size: 10px;
}

.operation-status.error {
    color: var(--red);
}

/* Video modal */

.video-overlay {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: grid;
    place-items: center;

    padding: 24px;

    background:
        rgba(0, 0, 0, .82);
}

.video-window {
    width: min(1100px, 96vw);

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

    background:
        var(--panel-strong);

    box-shadow:
        0 30px 120px rgba(0, 0, 0, .7);
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 13px 15px;

    border-bottom:
        1px solid var(--line-soft);
}

.video-title {
    margin-top: 5px;

    color: var(--text);

    font-size: 11px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.close-button {
    color: var(--red);
}

.video-stage {
    padding: 14px;

    background:
        #020405;
}

#videoPlayer {
    display: block;

    width: 100%;
    max-height: 75vh;

    background: #000;
}

/* responsive */

@media (max-width: 900px) {
    .file-row {
        grid-template-columns:
            100px
            minmax(150px, 1fr);

        align-items: center;
    }

    .file-actions {
        grid-column: 1 / -1;

        justify-content: flex-start;

        padding-left: 116px;
    }

    .media-preview {
        width: 96px;
        height: 70px;
    }

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

@media (max-width: 680px) {
    .page {
        padding: 10px;
    }

    #appView {
        width: 100%;
        min-height: calc(100vh - 20px);

        padding:
            18px 12px 16px;
    }

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

    .storage-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-row {
        grid-template-columns:
            82px
            minmax(0, 1fr);
    }

    .media-preview {
        width: 78px;
        height: 62px;
    }

    .file-actions {
        padding-left: 94px;
    }

    .file-name {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .video-overlay {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* ==================================================
   FILE DECK 2026-10-03 ADDITIONS
================================================== */

.main-tabs {
    align-items: center;
}

.main-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.upload-tab {
    cursor: pointer;
}

.storage-capacity {
    width: min(300px, 32vw);
}

.storage-capacity-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    color: var(--muted);

    font-size: 8px;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.storage-capacity-label strong {
    color: var(--amber);
    font-weight: 400;
}

.storage-meter {
    width: 100%;
    height: 6px;

    margin-top: 6px;

    overflow: hidden;

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

    background: #030607;
}

.storage-meter-fill {
    width: 0;

    height: 100%;

    background:
        var(--amber-soft);

    transition:
        width .2s ease,
        background .2s ease;
}

.storage-meter-fill.warning {
    background:
        #9f7b4b;
}

.storage-meter-fill.critical {
    background:
        var(--red);
}

.file-row.compact {
    grid-template-columns:
        48px
        minmax(180px, 1fr)
        auto;

    min-height: 64px;

    padding-top: 7px;
    padding-bottom: 7px;
}

.file-row.compact .media-preview {
    width: 40px;
    height: 40px;
}

.file-row.compact .file-meta {
    margin-top: 4px;
}

.file-row.compact .file-actions button {
    padding-top: 6px;
    padding-bottom: 6px;
}

.folder-icon,
.file-icon {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    position: relative;

    color: var(--amber-soft);

    background:
        rgba(18, 23, 27, .78);

    font-size: 10px;
    letter-spacing: .1em;
}

.folder-icon::before {
    content: "";

    position: absolute;

    width: 50px;
    height: 33px;

    left: 50%;
    top: 53%;

    transform:
        translate(-50%, -50%);

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

    background:
        rgba(8, 13, 17, .74);

    clip-path:
        polygon(
            0 16%,
            34% 16%,
            42% 0,
            100% 0,
            100% 100%,
            0 100%
        );
}

.folder-icon span,
.file-icon span {
    position: relative;
    z-index: 1;
}

.file-icon {
    color: #68635a;
}

.directory-row {
    min-height: 98px;
}

.directory-row .media-preview {
    width: 92px;
    height: 72px;
}

.preview-overlay-icon {
    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);

    width: 35px;
    height: 35px;

    display: grid;
    place-items: center;

    border:
        1px solid rgba(215, 168, 95, .48);

    background:
        rgba(2, 5, 7, .78);

    color: var(--amber);

    font-size: 13px;
}

.video-window {
    max-width: 1060px;
}

@media (max-width: 950px) {
    .storage-capacity {
        width: min(260px, 100%);
    }
}

@media (max-width: 680px) {
    .storage-capacity {
        width: 100%;
    }

    .main-tabs {
        flex-wrap: wrap;
    }

    .main-tab {
        flex: 1 1 auto;
    }

    .file-row.compact {
        grid-template-columns:
            42px
            minmax(0, 1fr);
    }

    .file-row.compact .file-actions {
        grid-column: 1 / -1;
        padding-left: 47px;
    }

    .directory-row {
        grid-template-columns:
            82px
            minmax(0, 1fr);
    }

    .directory-row .file-actions {
        grid-column: 1 / -1;
        padding-left: 0;
    }
}

