:root {
    --navy: #07182d;
    --navy-2: #0e2745;
    --ink: #14253a;
    --muted: #69788a;
    --line: #dfe6ee;
    --surface: #ffffff;
    --bg: #f4f7fa;
    --cyan: #45bfe2;
    --mint: #68c7b8;
    --blue: #5d72b8;
    --pink: #eb0d78;
    --yellow: #ffd64a;
    --shadow: 0 22px 60px rgba(8, 26, 48, .10);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
      radial-gradient(circle at 8% 0%, rgba(69,191,226,.16), transparent 26rem),
      radial-gradient(circle at 95% 20%, rgba(104,199,184,.13), transparent 23rem),
      var(--bg);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, input { font: inherit; }
.page-shell { width: min(1240px, calc(100% - 32px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: .04em; color: var(--navy); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand span { font-stretch: condensed; }
main { flex: 1; }
.login-card {
    width: min(470px, 100%);
    margin: 7vh auto 9vh;
    padding: clamp(28px, 6vw, 52px);
    border: 1px solid rgba(7,24,45,.08);
    border-radius: 28px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
    text-align: center;
}
.login-logo { margin: 0 auto 26px; display: grid; place-items: center; }
.login-logo img { width: 82px; height: 82px; object-fit: contain; }
.wordmark { margin-top: -7px; font-weight: 800; letter-spacing: .035em; font-size: 26px; color: var(--navy); transform: scaleX(.82); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: #2d83a3; font-weight: 800; font-size: 11px; }
h1 { margin: 10px 0 12px; font-size: clamp(32px, 6vw, 52px); line-height: 1.02; letter-spacing: -.035em; color: var(--navy); }
h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; color: var(--navy); }
h3 { margin: 0; font-size: 16px; }
p { line-height: 1.6; color: var(--muted); }
.lede { margin: 0 auto 26px; max-width: 34rem; }
.stack-form { display: grid; gap: 10px; text-align: left; margin-top: 24px; }
.stack-form label { font-size: 13px; font-weight: 700; color: var(--ink); }
.stack-form input[type="password"], .stack-form input[type="file"] {
    width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid #cfd9e4; background: #fff; padding: 11px 13px; color: var(--ink); outline: none;
}
.stack-form input[type="password"]:focus, .stack-form input[type="file"]:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(69,191,226,.13); }
.primary-button, .ghost-button, .link-button {
    border: 0; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.primary-button { margin-top: 8px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; padding: 0 19px; background: var(--navy); color: white; font-weight: 800; box-shadow: 0 10px 24px rgba(7,24,45,.16); }
.primary-button:hover, .ghost-button:hover { transform: translateY(-1px); }
.primary-button.small { min-height: 42px; margin-top: 0; }
.ghost-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid #ccd7e2; border-radius: 11px; padding: 0 16px; background: rgba(255,255,255,.7); color: var(--navy); font-weight: 750; }
.tiny-note { font-size: 12px; color: #8995a4; margin: 18px 0 0; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; text-align: left; }
.alert.error { background: #fff0f4; border: 1px solid #ffc8d7; color: #9f1642; }
.alert.success { background: #eefaef; border: 1px solid #bee7c8; color: #225f31; }
.wide-alert { margin: 18px 0; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 26px 0 28px; padding: clamp(28px, 5vw, 54px); border-radius: 30px; background: linear-gradient(135deg, var(--navy), #123a64); color: #fff; overflow: hidden; position: relative; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(69,191,226,.28), transparent 65%); }
.hero h1, .hero p { color: white; }
.hero p { opacity: .78; margin-bottom: 0; }
.hero-mark { width: 120px; height: 120px; border-radius: 28px; background: rgba(255,255,255,.08); display: grid; place-items: center; z-index: 1; flex: 0 0 auto; }
.hero-mark img { width: 84px; height: 84px; object-fit: contain; }
.compact-hero { padding-block: 38px; }
.viewer-card, .files-section, .panel { margin: 24px 0; padding: clamp(20px, 4vw, 30px); border-radius: 22px; background: var(--surface); border: 1px solid rgba(7,24,45,.08); box-shadow: 0 14px 38px rgba(8,26,48,.06); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-head h2 { margin-bottom: 0; }
.actions, .file-actions, .row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdf-frame { width: 100%; height: min(78vh, 900px); min-height: 540px; border: 1px solid #d8e1ea; border-radius: 16px; background: #eef2f5; }
.count-pill, .status { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #edf3f7; color: #436078; }
.status.good { background: #e5f7ec; color: #2d6e41; }
.status.warn { background: #fff4d9; color: #8c6219; }
.file-grid { display: grid; gap: 12px; }
.file-card, .admin-file-row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.file-icon { width: 48px; height: 48px; border-radius: 13px; background: linear-gradient(145deg, #eef5fa, #e5edf4); display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #47708b; letter-spacing: .08em; }
.file-body { min-width: 0; }
.file-body h3, .file-body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-body p, .file-body span { margin: 4px 0 0; color: #8090a1; font-size: 12px; }
.file-actions a, .row-actions a, .link-button { color: #176f91; font-size: 13px; font-weight: 800; text-decoration: none; background: transparent; padding: 4px; }
.link-button.danger { color: #b62451; }
.empty-state { padding: 32px; border-radius: 15px; background: #f7f9fb; color: #758597; text-align: center; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.admin-grid .panel { margin: 0; }
.compact-form { margin-top: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-weight: 600 !important; color: #53677c !important; }
.check-row input { margin-top: 3px; }
.admin-file-list { display: grid; gap: 10px; }
.row-actions form { margin: 0; }
.max-form { max-width: 520px; }
.submit-ghost { margin-top: 8px; }
.site-footer { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 30px 16px 38px; color: #7f8b98; font-size: 12px; text-align: center; }
.site-footer .dot { opacity: .45; }
@media (max-width: 760px) {
    .page-shell { width: min(100% - 20px, 1240px); }
    .topbar { min-height: 70px; }
    .hero { align-items: flex-start; }
    .hero-mark { width: 76px; height: 76px; border-radius: 20px; }
    .hero-mark img { width: 56px; height: 56px; }
    .admin-grid { grid-template-columns: 1fr; }
    .file-card, .admin-file-row { grid-template-columns: auto 1fr; }
    .file-actions, .row-actions { grid-column: 2; }
    .section-head { align-items: flex-start; }
    .pdf-frame { min-height: 440px; }
}
@media (max-width: 520px) {
    .brand span { display: none; }
    .login-card { margin-top: 4vh; border-radius: 22px; }
    .hero { border-radius: 22px; }
    .hero-mark { display: none; }
    .viewer-card, .files-section, .panel { border-radius: 18px; }
    .section-head { flex-direction: column; }
    .actions { width: 100%; }
    .actions a { flex: 1; }
    .pdf-frame { min-height: 380px; }
}
