:root {
  --ink: #17211b;
  --muted: #637068;
  --paper: #f6f5f0;
  --card: #ffffff;
  --line: #dfe3dc;
  --accent: #176b4b;
  --accent-dark: #0f5038;
  --accent-soft: #dff2e8;
  --danger: #9f2f2f;
  --shadow: 0 18px 55px rgba(28, 44, 35, .09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -15%, rgba(23, 107, 75, .15), transparent 34rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
  height: 82px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 33, 27, .08);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 13px; background: var(--accent); color: white;
  font-family: Georgia, serif; font-size: 25px;
}
.brand strong, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

main { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 58px 0 80px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 6vw, 66px); font-weight: 500; letter-spacing: -.035em; line-height: .98; }
h2 { margin-bottom: 8px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.eyebrow { margin-bottom: 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.intro { max-width: 650px; color: var(--muted); font-size: 17px; line-height: 1.6; }

.login-card {
  width: min(520px, 100%); margin: 5vh auto 0; padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.92); box-shadow: var(--shadow);
}
.login-card h1 { font-size: clamp(40px, 7vw, 58px); }
form { margin-top: 32px; }
label { display: block; margin: 18px 0 7px; font-size: 13px; font-weight: 750; }
input:not([type="file"]) {
  width: 100%; height: 48px; padding: 0 14px; color: var(--ink); background: #fff;
  border: 1px solid #cfd6ce; border-radius: 10px; font: inherit; outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,75,.13); }
form .button { width: 100%; margin-top: 24px; }
.form-error { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }

.button {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; transition: .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button-primary { background: var(--accent); color: white; box-shadow: 0 8px 22px rgba(23,107,75,.18); }
.button-primary:hover { background: var(--accent-dark); }
.button-quiet { background: transparent; color: var(--accent); border: 1px solid #c8d8cf; }
.button-danger { background: transparent; color: var(--danger); border: 1px solid #e4c7c7; }

.hero-row { display: grid; grid-template-columns: 1.5fr .7fr; gap: 36px; align-items: end; }
.quota-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.75); }
.quota-card > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.quota-card strong { font-size: 15px; }
.quota-track { height: 9px; margin: 15px 0 10px; overflow: hidden; border-radius: 999px; background: #dce3dd; }
.quota-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.quota-card small { color: var(--muted); }

.upload-panel, .files-panel { margin-top: 34px; padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.drop-zone { padding: 42px 24px; border: 1.5px dashed #aebbb1; border-radius: 18px; text-align: center; background: #fbfcfa; outline: none; }
.drop-zone.is-dragging, .drop-zone:focus { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone h2 { margin: 8px 0 4px; font-family: inherit; font-size: 21px; font-weight: 750; }
.drop-zone p { margin-bottom: 20px; color: var(--muted); }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 28px; }

.upload-list { display: grid; gap: 12px; margin-top: 18px; }
.upload-item { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.upload-top { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.upload-name { min-width: 0; }
.upload-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-name small { color: var(--muted); }
.progress-track { height: 7px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: #e8ece8; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; margin-top: 22px; border-collapse: collapse; }
th { padding: 11px 10px; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 17px 10px; border-bottom: 1px solid #edf0ec; font-size: 14px; }
td:first-child { min-width: 240px; max-width: 440px; font-weight: 700; overflow-wrap: anywhere; }
td:last-child { text-align: right; white-space: nowrap; }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; color: #4f5b53; background: #edf0ed; font-size: 12px; font-weight: 700; }
.status-ready { color: var(--accent-dark); background: var(--accent-soft); }
.link-button { padding: 7px 9px; color: var(--accent); background: transparent; border: 0; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; text-decoration: none; }
.link-button.danger { color: var(--danger); }
.empty-state { margin-top: 22px; padding: 36px; border-radius: 16px; background: #f7f8f5; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
footer { padding: 22px; color: #79847d; border-top: 1px solid rgba(23,33,27,.08); font-size: 12px; text-align: center; }

@media (max-width: 760px) {
  .site-header { height: 70px; padding: 0 18px; }
  main { padding-top: 38px; }
  .hero-row { grid-template-columns: 1fr; }
  .upload-panel, .files-panel { border-radius: 18px; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  td:first-child { min-width: 190px; }
}
