/* Springfield Owner Database
   House style. Change the colours in one place below. */

:root {
  --font-display: 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-mono: 'Poppins', ui-monospace, monospace;

  --navy: #0d2a4d;
  --navy-dark: #081d36;
  --red: #d8232a;
  --ink: #1c2430;
  --muted: #667085;
  --line: #e3e7ee;
  --bg: #f6f8fb;
  --card: #ffffff;

  --ok-bg: #e7f5ec;
  --ok-fg: #1c6b3a;
  --warn-bg: #fdf1dd;
  --warn-fg: #8a5a09;
  --bad-bg: #fdeaea;
  --bad-fg: #a32222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

/* Header ------------------------------------------------------- */
.topbar { background: var(--navy); }
.topbar-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.2px;
}
.brand span { font-weight: 300; opacity: 0.85; }
.topnav { display: flex; gap: 28px; }
.topnav a {
  color: #cdd7e5;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover { color: #fff; }
.topnav a.on { color: #fff; border-bottom-color: var(--red); }
.rule { height: 3px; background: var(--red); }

/* Page --------------------------------------------------------- */
.wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 36px 32px 64px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 28px;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 16px;
}
a { color: var(--navy); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Stats -------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 26px;
}
.stat .n {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
}
.stat .l { color: var(--muted); font-size: 15px; }

/* Forms -------------------------------------------------------- */
label.field { display: block; margin-bottom: 20px; }
label.field .lbl {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 7px;
}
input[type=text], input[type=file], select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 100%;
  max-width: 520px;
  color: var(--ink);
}
input[type=text]:focus, select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13, 42, 77, 0.12);
}
.row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0 28px;
  max-width: 900px;
}

button, .btn {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--navy-dark); }
button.ghost, .btn.ghost {
  background: #fff;
  color: var(--navy);
}
button.ghost:hover, .btn.ghost:hover { background: #eef2f8; }

/* Tags and notices --------------------------------------------- */
.tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  margin: 0 8px 8px 0;
}
.tag.ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag.warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag.bad { background: var(--bad-bg); color: var(--bad-fg); }

.notice {
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 15px;
}
.notice.info { background: #eaf1fa; color: var(--navy); }
.notice.ok { background: var(--ok-bg); color: var(--ok-fg); }
.notice.warn { background: var(--warn-bg); color: var(--warn-fg); }
.notice.bad { background: var(--bad-bg); color: var(--bad-fg); }

/* Tables ------------------------------------------------------- */
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
table.data th {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}
table.data td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
table.data tr:last-child td { border-bottom: none; }

.foot {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  color: var(--muted);
  font-size: 14px;
}

/* Import progress -------------------------------------------- */
.bar {
  height: 12px;
  background: #e9edf4;
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 999px;
  transition: width 0.3s ease;
}

label.opt {
  display: block;
  font-size: 15px;
  margin: 6px 0;
  cursor: pointer;
}
label.opt input { margin-right: 8px; }

/* Dense editable table rows ----------------------------------- */
table.data input[type=text], table.data select {
  max-width: 100%;
  padding: 8px 10px;
  font-size: 14px;
}
table.data .small-input { margin-top: 6px; }
table.data td { vertical-align: top; }

/* Owners table ------------------------------------------------- */
.filters .filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 20px;
}
.filters label.field { margin-bottom: 12px; }
.resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
  font-size: 16px;
}
.exports { display: flex; gap: 10px; flex-wrap: wrap; }
.exports .btn { font-size: 14px; padding: 10px 18px; }
.pager {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}
table.data td.small, table.data .small { font-size: 13px; }
