:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #243b55, #10151f 45%, #080b11);
    color: #eef4ff;
}
a { color: #8ec5ff; text-decoration: none; }
a:hover { text-decoration: underline; }
.shell, .wide-shell { width: min(960px, calc(100% - 32px)); margin: 7vh auto; }
.wide-shell { width: min(1180px, calc(100% - 32px)); margin-top: 32px; }
.card, .login-card {
    background: rgba(11, 18, 32, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 24px;
    box-shadow: 0 24px 90px rgba(0,0,0,.36);
    padding: 28px;
    backdrop-filter: blur(10px);
}
.login-card { width: min(440px, 100%); margin: 0 auto; }
h1 { margin: 0 0 8px; letter-spacing: -0.03em; font-size: clamp(28px, 4vw, 42px); }
.muted { color: #a9b7cb; margin: 0 0 20px; }
.tiny { color: #8290a4; font-size: 13px; margin-top: 20px; }
.alert { padding: 12px 14px; border-radius: 12px; background: rgba(220, 38, 38, .14); border: 1px solid rgba(248, 113, 113, .35); color: #fecaca; margin-bottom: 16px; }
label { display: block; margin: 14px 0; color: #cbd5e1; font-size: 14px; }
input[type=text], input[type=password] {
    width: 100%; margin-top: 7px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(148,163,184,.28);
    background: rgba(15, 23, 42, .9); color: #f8fafc; outline: none;
}
input:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59,130,246,.18); }
button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 12px; padding: 11px 16px; min-height: 42px;
    background: #dbeafe; color: #0f172a; font-weight: 700; cursor: pointer;
}
button:hover, .button:hover { filter: brightness(.96); text-decoration: none; }
.button.secondary { background: rgba(148, 163, 184, .14); color: #e2e8f0; border: 1px solid rgba(148,163,184,.22); }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.module { display: block; padding: 20px; border-radius: 18px; background: rgba(59, 130, 246, .12); border: 1px solid rgba(147,197,253,.2); min-height: 140px; }
.module:hover { text-decoration: none; background: rgba(59, 130, 246, .18); }
.module.disabled { opacity: .58; background: rgba(148, 163, 184, .08); }
.module-title { display: block; color: #eff6ff; font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.module-text { color: #a9b7cb; line-height: 1.5; }
.folder-tools { display: flex; gap: 16px; align-items: stretch; justify-content: space-between; margin: 20px 0; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex: 1 1 340px; }
.inline-form input { margin: 0; }
.drop-target { flex: 1 1 360px; min-height: 76px; display: flex; align-items: center; justify-content: center; border: 2px dashed rgba(148,163,184,.45); border-radius: 16px; color: #a9b7cb; cursor: pointer; }
.drop-target input { display: none; }
.drop-target.drag-over { border-color: #93c5fd; color: #dbeafe; background: rgba(147,197,253,.1); }
.no-write .folder-tools { display: none; }
#upload-progress { min-height: 8px; }
.progress-row { margin: 8px 0; padding: 9px 12px; border-radius: 10px; background: rgba(148,163,184,.1); color: #cbd5e1; }
.progress-row.error { background: rgba(220, 38, 38, .14); color: #fecaca; }
table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; }
th { text-align: left; color: #bfdbfe; font-size: 13px; background: rgba(30,41,59,.75); cursor: pointer; user-select: none; }
th, td { padding: 12px 10px; border-bottom: 1px solid rgba(148,163,184,.13); vertical-align: middle; }
td { color: #dbeafe; font-size: 14px; }
td.first { min-width: 300px; }
tr:hover td { background: rgba(148,163,184,.06); }
.empty { text-align: center; color: #94a3b8; padding: 44px 0; }
.name { padding-left: 28px; position: relative; color: #e0f2fe; font-weight: 650; }
.name::before { position: absolute; left: 0; top: -1px; }
.name.file::before { content: "📄"; }
.name.folder::before { content: "📁"; }
.download { margin-right: 14px; }
.link { background: none; color: #93c5fd; padding: 0; min-height: auto; border-radius: 0; font-weight: 600; }
.link.danger { color: #fca5a5; }
@media (max-width: 720px) {
    .topbar { flex-direction: column; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}
