/* Settlement Generator — minimal, readable styling for a buttons-and-forms tool.
   No framework; one file. Tuned for clarity over flash. */

:root {
  --ink: #1b2430;
  --muted: #667085;
  --line: #e3e8ef;
  --brand: #0b5c4b;      /* LOAD IQ green-ish */
  --brand-dark: #084235;
  --bg: #f6f8fa;
  --danger: #b42318;
  --ok: #067647;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); color: #fff; padding: 0 20px; height: 56px;
}
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 17px; }
.topbar nav a { color: #e7f2ee; text-decoration: none; margin-left: 18px; font-size: 15px; }
.topbar nav a:hover { color: #fff; text-decoration: underline; }
.topbar nav a.logout { opacity: .85; }

.container { max-width: 980px; margin: 28px auto; padding: 0 20px; }

h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 18px; margin: 0 0 6px; }
.muted { color: var(--muted); }

/* Flash messages */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 15px; }
.flash.error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.flash.notice { background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6; }

/* Login */
.login-card {
  max-width: 360px; margin: 10vh auto; background: #fff; padding: 28px;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(16,24,40,.06);
}
.login-card h1 { font-size: 20px; margin-bottom: 2px; }
.login-card form { margin-top: 18px; }

/* Forms */
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
button, .btn {
  display: inline-block; margin-top: 16px; padding: 10px 18px; border: 0; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; line-height: 1.2;
  box-shadow: 0 1px 2px rgba(16,24,40,.12);
  transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
}
button:hover, .btn:hover { background: var(--brand-dark); box-shadow: 0 2px 6px rgba(8,66,53,.22); }
button:active, .btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.secondary:hover { background: #f9fafb; border-color: var(--brand); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 13px; margin-top: 0; }

/* Drag-and-drop upload zone (progressive enhancement over the file input). */
.dz-input {
  /* Visually hidden but still focusable/submittable — the dropzone is the UI. */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dropzone {
  display: block; margin: 6px 0 0; padding: 28px 20px; cursor: pointer;
  text-align: center; border: 2px dashed var(--line); border-radius: 12px;
  background: #fbfcfd; color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover { border-color: var(--brand); background: #f6fbf9; }
.dropzone.dragover { border-color: var(--brand); background: #ecfdf3; border-style: solid; }
.dropzone.has-files { border-style: solid; border-color: var(--brand); background: #f6fbf9; }
.dropzone .dz-icon { font-size: 26px; color: var(--brand); line-height: 1; }
.dropzone .dz-main { margin-top: 8px; font-size: 16px; }
.dropzone .dz-sub { margin-top: 4px; font-size: 13px; }
.dropzone .dz-link { color: var(--brand); text-decoration: underline; }
.dz-list { list-style: none; margin: 12px 0 0; padding: 0; }
.dz-list li {
  display: inline-block; margin: 4px; padding: 5px 12px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--ink);
}
.dz-list li::before { content: "📄 "; }

/* Cards grid (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; text-decoration: none; color: var(--ink);
}
.card:hover { border-color: var(--brand); }
.card.primary { background: var(--brand); color: #fff; }
.card.primary p { color: #e7f2ee; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }

/* Tables */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { background: #fbfcfd; color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: #ecfdf3; color: var(--ok); }
.pill.warn { background: #fffaeb; color: #b54708; }
.pill.muted { background: #f2f4f7; color: var(--muted); }

.row-actions a { margin-right: 10px; font-size: 14px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
