/* API brand: Arial, teal + yellow, AU English. Hexes to be matched to the
   100 Years Brand Guideline during polish day. */
:root {
  --teal: #007582;
  --teal-dark: #005a64;
  --yellow: #ffb81c;
  --ink: #1d2b2e;
  --paper: #f5f7f7;
  --card: #ffffff;
  --line: #dde5e6;
  --muted: #5f7377;
  --red: #c0392b;
  --amber: #b9770e;
  --green: #1e8449;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-note { font-size: 13px; margin-top: -6px; }

/* Login */
.login-wrap {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 100%);
}
.login-card {
  background: var(--card); border-radius: 10px; padding: 40px 44px;
  width: 360px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.login-card h1 { font-size: 22px; margin: 14px 0 4px; }
.login-card input {
  width: 100%; padding: 11px 12px; margin: 18px 0 10px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 15px;
}
.login-card button {
  width: 100%; padding: 11px; border: 0; border-radius: 6px;
  background: var(--teal); color: #fff; font-size: 15px; font-weight: bold; cursor: pointer;
}
.login-card button:hover { background: var(--teal-dark); }
.error { color: var(--red); font-size: 13px; }

.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: bold; font-size: 18px;
  border: 3px solid var(--yellow);
}
.brand-mark.small { width: 40px; height: 40px; font-size: 14px; }

/* Header */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: var(--card); border-bottom: 3px solid var(--teal);
}
.header-left { display: flex; gap: 14px; align-items: center; }
header h1 { font-size: 19px; margin: 0; }
header p { margin: 2px 0 0; font-size: 13px; }
.header-right { display: flex; gap: 12px; align-items: center; }
.role-badge {
  background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: bold;
  padding: 4px 10px; border-radius: 12px;
}
button.ghost {
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; cursor: pointer; color: var(--muted);
}

/* Summary tiles */
.summary-row { display: flex; gap: 14px; padding: 18px 28px 0; flex-wrap: wrap; }
.tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 18px; min-width: 130px;
}
.tile .num { font-size: 26px; font-weight: bold; color: var(--teal); }
.tile .lbl { font-size: 12px; color: var(--muted); }

/* Filters */
.filters {
  display: flex; gap: 10px; padding: 16px 28px; flex-wrap: wrap; align-items: center;
}
.filters input[type="search"] {
  flex: 1; min-width: 220px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 6px;
}
.filters select { padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.chk { font-size: 14px; color: var(--muted); }

/* Board */
main { padding: 0 28px 30px; }
.area-block { margin-top: 22px; }
.area-block > h2 {
  font-size: 15px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--teal-dark); border-bottom: 2px solid var(--yellow);
  padding-bottom: 6px; margin-bottom: 10px;
}
.item {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 8px;
}
.item-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.item-title { font-weight: bold; font-size: 15px; flex: 1; min-width: 240px; }
.star { color: var(--amber); }
.item-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.item-body { font-size: 13.5px; margin-top: 8px; display: none; }
.item.open .item-body { display: block; }
.item-body dt { font-weight: bold; color: var(--teal-dark); margin-top: 8px; font-size: 12.5px; text-transform: uppercase; }
.item-body dd { margin: 2px 0 0; white-space: pre-line; }
.item { cursor: pointer; }

.pill {
  display: inline-block; font-size: 11.5px; font-weight: bold;
  padding: 3px 9px; border-radius: 10px; white-space: nowrap;
}
.pill-notstarted { background: #eceff0; color: var(--muted); }
.pill-inprogress { background: #e3f2ef; color: var(--green); }
.pill-ongoing { background: #e8f0fb; color: #2a5aa0; }
.pill-onhold { background: #fdf3e0; color: var(--amber); }
.pill-done { background: var(--green); color: #fff; }
.pill-harriet { background: #f7e6ea; color: #8e2440; }
.due-overdue { color: var(--red); font-weight: bold; }

/* Admin panel */
#admin-panel { padding: 10px 28px 40px; }
#admin-panel h2 { font-size: 16px; color: var(--teal-dark); margin-top: 28px; }
table.cases { width: 100%; border-collapse: collapse; background: var(--card); font-size: 13.5px; }
table.cases th, table.cases td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
table.cases th { background: #eef4f4; font-size: 12px; text-transform: uppercase; color: var(--teal-dark); }
.digest-entry {
  background: var(--card); border-left: 4px solid var(--yellow);
  border-radius: 0 6px 6px 0; padding: 9px 14px; margin-bottom: 6px; font-size: 13.5px;
}
.digest-entry .when { color: var(--muted); font-size: 12px; }

footer { padding: 18px 28px 30px; font-size: 12.5px; }

@media (max-width: 640px) {
  header, .filters, main, .summary-row, #admin-panel { padding-left: 14px; padding-right: 14px; }
}
