:root {
  color-scheme: light;
  --ink: #14251f;
  --muted: #64746d;
  --line: #dce5df;
  --paper: #f3f6f3;
  --surface: #fff;
  --green: #28604b;
  --green-deep: #174331;
  --mint: #e3f0e8;
  --amber: #9a6b21;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.shell { width: min(100% - 36px, 900px); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 730; letter-spacing: -.025em; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--green); color: white; font-family: Georgia, serif; font-size: 20px; font-style: italic; }
.language-control select { min-width: 62px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); padding: 8px 10px; font-size: 12px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.intro { padding: 56px 0 28px; max-width: 680px; }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; max-width: 620px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(36px, 7vw, 58px); line-height: .99; font-weight: 500; letter-spacing: -.045em; }
.lead { max-width: 590px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.panel { margin: 0 0 16px; padding: 25px 27px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 7px 20px rgb(26 55 41 / 3%); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 6px; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.025em; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #f8f1e6; color: var(--amber); font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #cf9a3c; }
label { display: block; margin-bottom: 8px; color: #35463e; font-size: 12px; font-weight: 700; }
.input-row { display: flex; gap: 9px; }
input { min-width: 0; width: 100%; border: 1px solid #cbd7cf; border-radius: 9px; background: white; color: var(--ink); outline: none; padding: 12px 13px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgb(40 96 75 / 12%); }
.button { border: 0; border-radius: 9px; padding: 11px 15px; font-size: 12px; font-weight: 750; white-space: nowrap; transition: background .15s, transform .15s; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
.primary { background: var(--green); color: white; }
.primary:hover:not(:disabled) { background: var(--green-deep); }
.secondary { border: 1px solid var(--line); background: white; color: var(--green-deep); }
.secondary:hover:not(:disabled) { background: var(--mint); }
.help { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.folder-row { margin-top: 22px; }
.credential-panel { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.credential-panel summary { color: var(--green-deep); cursor: pointer; font-size: 12px; font-weight: 750; }
.credential-panel form { display: grid; gap: 8px; margin-top: 15px; }
.credential-panel form label { margin: 3px 0 0; }
.credential-panel form .input-row { margin-top: 2px; }
.folder-row input { max-width: 420px; }
.message { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; background: #eef4ef; color: var(--green-deep); font-size: 12px; line-height: 1.5; }
.message.error { background: #fbefed; color: #8e3027; }
.empty-state { display: flex; min-height: 136px; flex-direction: column; align-items: center; justify-content: center; padding: 24px 12px; border: 1px dashed #d4dfd7; border-radius: 11px; background: #fbfcfb; text-align: center; }
.empty-state p { max-width: 380px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--mint); color: var(--green); font-size: 20px; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid #edf1ee; }
.file-row:last-child { border-bottom: 0; }
.file-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--mint); color: var(--green); font-size: 15px; }
.file-info { min-width: 0; flex: 1; }
.file-name { overflow: hidden; margin: 0 0 3px; color: var(--ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { margin: 0; color: var(--muted); font-size: 11px; }
.file-open { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--green-deep); font-size: 11px; font-weight: 700; }
.file-open:hover { background: var(--mint); }
.toolbar { display: flex; flex-wrap: wrap; gap: 7px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin: -7px 0 14px; color: var(--muted); font-size: 12px; }
.breadcrumbs button { border: 0; padding: 0; background: transparent; color: var(--green-deep); text-decoration: underline; }
.row-actions { display: flex; gap: 6px; }
.upload-progress { margin: 0 0 13px; padding: 10px 12px; border-radius: 8px; background: var(--mint); color: var(--green-deep); font-size: 12px; }
.upload-progress button { margin-left: 7px; }
.upload-progress[hidden] { display: none; }
[hidden] { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 14px; padding: 24px 2px 36px; color: var(--muted); font-size: 10px; }
.footer-mark { color: #87958d; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 900px); }
  .topbar { height: 64px; }
  .intro { padding: 40px 0 23px; }
  .lead { font-size: 14px; }
  .panel { padding: 20px 17px; border-radius: 13px; }
  .section-heading { align-items: flex-start; }
  .status-pill { font-size: 10px; }
  .input-row { flex-direction: column; }
  .primary { width: 100%; }
  .file-row { gap: 9px; }
  .file-row { flex-wrap: wrap; }
  .row-actions { margin-left: 44px; }
  .toolbar { width: 100%; }
  .toolbar .button { flex: 1 1 42%; white-space: normal; }
  footer { flex-direction: column; }
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --ink:#e8efe9; --muted:#a3b2a8; --line:#35463d; --paper:#111914; --surface:#1a241e; --green:#67a987; --green-deep:#a6d5ba; --mint:#243a2e; --amber:#e4b966; }
  label { color:#c6d2ca; }
  input,.language-control select,.secondary,.file-open { background:#18221c; color:var(--ink); border-color:#405449; }
  .empty-state { background:#151e18; border-color:#35463d; }
  .file-row { border-color:#2b3930; }
  .status-pill { background:#362f20; }
  .message { background:#203329; color:#bce3c9; }
  .message.error { background:#3b2522; color:#f0b9af; }
}
