:root {
    --bg: #03040a;
    --panel: #0a0d18;
    --panel-soft: #111526;
    --surface: #ffffff;
    --surface-text: #090b14;
    --line: #292f46;
    --line-strong: #4a345f;
    --text: #ffffff;
    --muted: #c8cdd8;
    --muted-2: #7d8494;
    --teal: #d6008d;
    --teal-dark: #7b35ff;
    --magenta: #a855f7;
    --danger: #ff5b76;
    --success: #4ce19b;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(90deg, rgba(214, 0, 141, 0.055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        var(--bg);
    background-size: 46px 46px, 46px 46px, auto;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.home-shell {
    display: grid;
    grid-template-columns: minmax(360px, 35%) minmax(0, 65%);
    min-height: 100vh;
}

.upload-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: clamp(24px, 4vw, 52px);
    background: linear-gradient(180deg, rgba(3, 4, 10, 0.98), rgba(8, 10, 20, 0.96));
    border-right: 1px solid rgba(214, 0, 141, 0.18);
}

.brand-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-logo,
.admin-logo {
    width: 184px;
    height: auto;
    display: block;
}

.intro {
    max-width: 520px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.intro h1,
.admin-header h1,
.admin-card h1,
.message-panel h1 {
    margin-bottom: 12px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.02;
}

.intro p,
.message-panel p {
    color: var(--muted);
}

.upload-form,
.success-box,
.admin-card,
.message-panel {
    background: rgba(10, 13, 24, 0.92);
    border: 1px solid rgba(214, 0, 141, 0.22);
    box-shadow: var(--shadow);
}

.upload-form,
.success-box {
    padding: 18px;
}

.upload-form {
    display: grid;
    gap: 16px;
}

.dropzone {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 190px;
    padding: 26px 20px;
    text-align: center;
    color: var(--text);
    border: 1px dashed rgba(214, 0, 141, 0.62);
    background:
        linear-gradient(135deg, rgba(214, 0, 141, 0.16), transparent 42%),
        rgba(255, 255, 255, 0.03);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone.is-dragging {
    border-color: #ffffff;
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.2), transparent 42%),
        rgba(16, 20, 38, 0.98);
    transform: translateY(-1px);
}

.dropzone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: #ffffff;
    background: var(--teal);
    font-size: 32px;
    font-weight: 600;
}

.dropzone strong {
    font-size: 19px;
}

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

.file-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.file-list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}

.file-list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.file-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: var(--muted);
    font-size: 13px;
}

.remove-file,
.link-button,
.danger-button {
    border: 0;
    color: var(--text);
    background: transparent;
}

.remove-file {
    width: 32px;
    height: 32px;
    color: var(--danger);
    font-size: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 12px;
}

label span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--text);
    background: #070914;
    border: 1px solid var(--line);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(57, 230, 220, 0.13);
}

.primary-button,
.secondary-button,
.danger-button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.secondary-button {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(214, 0, 141, 0.32);
}

.danger-button {
    min-height: 36px;
    color: #ffeef2;
    background: rgba(255, 91, 118, 0.12);
    border-color: rgba(255, 91, 118, 0.34);
}

.link-button {
    min-height: 36px;
    color: #ffffff;
    border-color: rgba(214, 0, 141, 0.35);
}

.progress-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
}

.progress-track {
    height: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--teal-dark));
    transition: width 120ms ease;
}

.form-message,
.notice,
.alert {
    min-height: 20px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.form-message.error,
.alert {
    color: #ffd4dc;
}

.form-message.success {
    color: var(--success);
}

.success-box {
    display: grid;
    gap: 14px;
}

.success-box[hidden],
.progress-wrap[hidden] {
    display: none;
}

.success-box h2 {
    margin: 0;
    font-size: 20px;
}

.success-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
}

.brand-column {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 100vh;
    padding: clamp(28px, 6vw, 88px);
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(214, 0, 141, 0.18), transparent 32%),
        linear-gradient(300deg, rgba(123, 53, 255, 0.2), transparent 42%),
        #04050b;
}

.brand-column::before {
    content: "";
    position: absolute;
    inset: 8% -10% auto auto;
    width: 58%;
    height: 58%;
    border: 1px solid rgba(214, 0, 141, 0.34);
    transform: skew(-12deg) rotate(-8deg);
}

.brand-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, transparent, black 22%, black 82%, transparent);
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.brand-content h2 {
    max-width: 780px;
    margin-bottom: 28px;
    font-size: clamp(44px, 7vw, 96px);
    line-height: 0.98;
    text-transform: uppercase;
}

.brand-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.brand-tags span,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.transfer-visual {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    width: min(520px, 100%);
    margin-top: 56px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 2px solid rgba(214, 0, 141, 0.9);
    box-shadow: var(--shadow);
}

.visual-header {
    display: flex;
    gap: 8px;
}

.visual-header span {
    width: 10px;
    height: 10px;
    background: #111526;
}

.visual-line {
    width: 54%;
    height: 8px;
    background: rgba(9, 11, 20, 0.13);
}

.visual-line.wide {
    width: 76%;
}

.visual-file {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 2px 12px;
    align-items: center;
    padding: 12px;
    color: var(--surface-text);
    background: #ffffff;
    border: 1px solid rgba(9, 11, 20, 0.12);
    animation: fileDrift 5s ease-in-out infinite;
}

.visual-file:nth-child(6) {
    animation-delay: 0.6s;
}

.visual-file:nth-child(7) {
    animation-delay: 1.2s;
}

.visual-file span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: var(--teal);
    font-size: 12px;
    font-weight: 900;
}

.visual-file.active span {
    background: var(--magenta);
    color: #fff;
}

.visual-file strong,
.visual-file small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visual-file small {
    color: #667085;
}

@keyframes fileDrift {
    0%,
    100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
}

.admin-shell,
.message-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0;
}

.admin-shell.compact,
.message-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.admin-card,
.message-panel {
    width: min(440px, 100%);
    padding: 28px;
}

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

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.admin-table-wrap {
    overflow-x: auto;
    background: rgba(10, 13, 24, 0.92);
    border: 1px solid rgba(214, 0, 141, 0.2);
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--muted);
    font-size: 14px;
    vertical-align: middle;
}

.admin-table th {
    color: var(--text);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.035);
}

.admin-table .filename {
    max-width: 260px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status.active {
    color: #bfffee;
    border-color: rgba(76, 225, 155, 0.35);
}

.status.expired {
    color: #ffe2a8;
    border-color: rgba(255, 203, 94, 0.35);
}

.status.deleted {
    color: #ffccd5;
    border-color: rgba(255, 91, 118, 0.35);
}

.inline-form {
    margin: 0;
}

.empty-cell,
.muted {
    color: var(--muted-2);
}

.message-panel {
    text-align: center;
}

.message-panel .admin-logo {
    margin: 0 auto 24px;
}

@media (max-width: 980px) {
    .home-shell {
        grid-template-columns: 1fr;
    }

    .upload-column {
        border-right: 0;
        border-bottom: 1px solid rgba(214, 0, 141, 0.18);
    }

    .brand-column {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .upload-column,
    .brand-column {
        padding: 22px;
    }

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

    .form-grid,
    .file-list li {
        grid-template-columns: 1fr;
    }

    .file-list li {
        gap: 6px;
    }

    .remove-file {
        justify-self: start;
    }

    .brand-content h2 {
        font-size: 42px;
    }

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