:root {
    --bg: #080c17;
    --panel: #111827;
    --panel-2: #161f31;
    --line: #263249;
    --text: #eef2ff;
    --muted: #96a3b8;
    --primary: #7c8cff;
    --primary-strong: #6475f3;
    --success: #37c987;
    --danger: #ef6470;
    --warning: #f3b85d;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0,0,0,.22);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% -10%, rgba(124,140,255,.16), transparent 32rem),
        radial-gradient(circle at 100% 20%, rgba(55,201,135,.08), transparent 26rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(8,12,23,.82);
    backdrop-filter: blur(18px);
}
.topbar-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center;
    background: linear-gradient(145deg, var(--primary), #a875ff); color: white; font-size: 13px; box-shadow: 0 8px 24px rgba(124,140,255,.28);
}
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 17px; }
.nav { display: flex; align-items: center; gap: 18px; color: #d9e0ee; font-size: 14px; }
.nav a:hover { color: white; }
.nav-muted { color: var(--muted) !important; }
.page { padding-block: 42px 64px; }
.footer { padding: 22px 0 34px; display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.hero {
    display: grid; grid-template-columns: 1fr minmax(280px, 390px); align-items: end; gap: 32px; margin-bottom: 26px;
}
.hero h1, .page-heading h1 { margin: 4px 0 8px; font-size: clamp(34px, 5vw, 54px); letter-spacing: -.045em; line-height: 1.02; }
.eyebrow { margin: 0; color: #aeb9ff; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.muted { color: var(--muted); }
.card {
    background: linear-gradient(180deg, rgba(22,31,49,.96), rgba(14,21,35,.96));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.narrow { width: min(620px, 100%); margin-inline: auto; }
.storage-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: rgba(17,24,39,.8); }
.storage-row, .progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.storage-card small { color: var(--muted); }
.meter, .progress { overflow: hidden; height: 9px; background: #070b14; border-radius: 999px; margin: 12px 0 10px; border: 1px solid rgba(255,255,255,.04); }
.meter span, .progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #9c75ff); transition: width .2s ease; }
.section-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading h2, .card h2 { margin: 0 0 5px; letter-spacing: -.02em; }
.section-heading p, .page-heading p { margin: 0; }
.files-heading { margin: 38px 0 14px; }
.form-grid { display: grid; gap: 16px; }
.form-grid h2 { margin: 14px 0 -4px; font-size: 17px; }
label { display: grid; gap: 8px; color: #dce4f2; font-size: 14px; font-weight: 650; }
input, select {
    width: 100%; min-height: 46px; padding: 11px 13px; color: var(--text); background: #0a1020;
    border: 1px solid #2a3650; border-radius: 12px; outline: none;
}
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,140,255,.12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone {
    min-height: 190px; place-items: center; align-content: center; text-align: center;
    border: 1.5px dashed #3a4968; border-radius: 16px; background: rgba(8,13,25,.55); cursor: pointer; padding: 24px;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--primary); background: rgba(124,140,255,.07); }
.dropzone input { display: none; }
.dropzone small { color: var(--muted); font-weight: 500; }
.drop-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(124,140,255,.15); color: #bdc5ff; font-size: 26px; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button {
    min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: white; font-weight: 750;
}
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.primary { background: var(--primary); }
.button.primary:hover { background: var(--primary-strong); }
.button.secondary { background: #243150; border-color: #354466; }
.button.ghost { background: transparent; border-color: var(--line); color: #dce4f2; }
.button.danger { background: rgba(239,100,112,.15); border-color: rgba(239,100,112,.4); color: #ff9aa3; }
.button.small { min-height: 36px; padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.button.large { min-height: 54px; font-size: 16px; }
.button.full, .full { width: 100%; }
.progress-wrap { padding: 15px; border-radius: 14px; background: rgba(7,11,20,.7); border: 1px solid var(--line); }
.progress-meta.small { color: var(--muted); font-size: 12px; }
.alert { padding: 13px 15px; border-radius: 12px; border: 1px solid; margin: 12px 0; }
.alert-error { color: #ffadb5; background: rgba(239,100,112,.1); border-color: rgba(239,100,112,.32); }
.alert-success { color: #8ee6bb; background: rgba(55,201,135,.1); border-color: rgba(55,201,135,.3); }
.hidden { display: none !important; }
.status-pill { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; color: #bfc9da; background: #222d42; border: 1px solid #303e59; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.status-active { color: #7ee3b3; background: rgba(55,201,135,.1); border-color: rgba(55,201,135,.25); }
.status-deleted, .status-expired { color: #f59da5; background: rgba(239,100,112,.08); border-color: rgba(239,100,112,.22); }
.file-list, .user-list { display: grid; gap: 12px; }
.file-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 18px; }
.file-icon { width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; background: #202d49; color: #c7ceff; font-size: 11px; font-weight: 900; }
.file-main { min-width: 0; }
.file-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.file-title-row h3 { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 16px; }
.file-main p { margin: 6px 0 0; font-size: 13px; }
.file-description { color: #cbd5e4; }
.file-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.empty-state { text-align: center; padding: 44px; }
.manage-grid { display: grid; gap: 18px; margin-top: 20px; }
.details { margin: 18px 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.details div { padding: 14px; background: rgba(8,13,25,.55); border-radius: 12px; border: 1px solid rgba(255,255,255,.05); }
.details dt { color: var(--muted); font-size: 12px; }
.details dd { margin: 5px 0 0; font-weight: 750; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.danger-zone { border-color: rgba(239,100,112,.25); }
.back-link { display: inline-block; color: #b8c1ff; margin-bottom: 14px; }
.auth-card { width: min(440px, 100%); margin: 8vh auto; }
.auth-heading { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.auth-heading h1 { margin: 0; }
.auth-heading p { margin: 5px 0 0; }
.install-page { padding-block: 50px; }
.install-brand { margin-bottom: 20px; }
.public-wrap { min-height: 64vh; display: grid; place-items: center; }
.public-card { width: min(620px, 100%); text-align: center; padding: clamp(26px, 6vw, 52px); }
.public-icon { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 22px; display: grid; place-items: center; background: rgba(124,140,255,.15); color: #c9ceff; font-size: 34px; }
.public-icon.unavailable { background: rgba(239,100,112,.1); color: #ff9ca5; }
.public-card h1 { word-break: break-word; margin: 9px 0 16px; font-size: clamp(27px, 5vw, 40px); letter-spacing: -.035em; }
.public-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 16px; color: var(--muted); font-size: 14px; }
.public-description { margin: 24px 0; padding: 15px; border-radius: 12px; background: rgba(7,11,20,.55); }
.unlock-form { margin-top: 25px; text-align: left; }
.safety-note { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.check-label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 9px; }
.check-label input { width: 18px; min-height: 18px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.user-row h3 { margin: 0; }
.user-row p { margin: 7px 0 0; }
.admin-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.inline-form { display: flex; gap: 7px; }
.compact-input { width: 145px; min-height: 36px; padding: 7px 9px; font-size: 13px; }
.inline-link { border: 0; background: transparent; padding: 0; color: #bfc7ff; text-decoration: underline; cursor: pointer; }
code { color: #cbd2ff; }
@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; }
    .nav a:not(:last-child) { display: none; }
    .file-row { grid-template-columns: 48px minmax(0,1fr); }
    .file-icon { width: 48px; height: 48px; }
    .file-actions { grid-column: 1 / -1; justify-content: stretch; }
    .file-actions .button { flex: 1; }
    .user-row { align-items: stretch; flex-direction: column; }
    .admin-actions { justify-content: stretch; }
    .inline-form { flex: 1 1 100%; }
    .compact-input { flex: 1; width: auto; }
}
@media (max-width: 560px) {
    .shell { width: min(100% - 20px, 1180px); }
    .page { padding-top: 24px; }
    .card { padding: 17px; border-radius: 15px; }
    .two-col, .details { grid-template-columns: 1fr; }
    .footer { flex-direction: column; gap: 6px; }
    .hero h1, .page-heading h1 { font-size: 34px; }
    .topbar-inner { min-height: 60px; }
    .file-row { padding: 14px; gap: 11px; }
    .public-card { padding: 25px 18px; }
}
