/* Eden West Catering — Rep Portal
   Letterhead: Archivo Black + Karla, red CATERING, yellow bar.
   Brand: never "cook" — use "cater".
*/
:root {
  --red: #C0392B;
  --red-dark: #922B21;
  --yellow: #F1C40F;
  --ink: #1F1B16;
  --paper: #FFFCF5;
  --muted: #6E6258;
  --line: #E7DFD2;
  --good: #1E8449;
  --warn: #B9770E;
  --bad: #B03A2E;
  --shadow: 0 1px 0 rgba(31,27,22,0.04), 0 6px 20px rgba(31,27,22,0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Karla', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
h1, h2, h3 { font-family: 'Archivo Black', 'Archivo', system-ui, sans-serif; letter-spacing: 0.5px; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

/* letterhead */
.letterhead {
  border-bottom: 4px solid var(--yellow);
  padding: 28px 28px 18px;
  background: #fff;
}
.brand {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.brand .name { font-family: 'Archivo Black', sans-serif; font-size: 28px; }
.brand .cat { color: var(--red); font-weight: 900; letter-spacing: 4px; font-size: 22px; }
.brand .sub { color: var(--muted); font-size: 14px; margin-left: 6px; }

nav.appnav {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 10px 28px; background: #fff; border-bottom: 1px solid var(--line);
}
nav.appnav a, nav.appnav button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font: inherit; cursor: pointer;
}
nav.appnav a.active, nav.appnav button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
nav.appnav .right { margin-left: auto; }

main { padding: 24px 28px 64px; max-width: 1100px; margin: 0 auto; }

button.primary, .btn-primary {
  background: var(--red); color: #fff; border: 1px solid var(--red);
  padding: 10px 16px; border-radius: 8px; font: inherit; cursor: pointer;
}
button.primary:hover, .btn-primary:hover { background: var(--red-dark); }
button.secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer;
}
button.danger { background: #fff; color: var(--bad); border: 1px solid var(--bad); }

input, select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
textarea { min-height: 80px; }
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--ink); }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2, .card h3 { margin-top: 0; }

.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.tile .lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.tile .val { font-family: 'Archivo Black', sans-serif; font-size: 26px; margin-top: 6px; }
.tile.pending .val { color: var(--warn); }
.tile.earned .val { color: var(--good); }
.tile.threshold .val { color: var(--red); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #FAF5EA; font-weight: 800; }
tr:hover td { background: #FFFCF5; }
.right { text-align: right; }

.bar { background: #EFE8D7; border-radius: 6px; height: 10px; overflow: hidden; }
.bar > div { height: 100%; background: var(--good); }

.banner { background: #FFF7E0; border: 1px solid #E0B95A; color: #6E4A00; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.banner.error { background: #FFEDEA; border-color: #C0392B; color: #6B1B12; }
.banner.ok    { background: #E8F6EE; border-color: #1E8449; color: #145A32; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.gray   { background: #ECE6D8; color: #4A4339; }
.pill.green  { background: #DCEFE0; color: #1E6F3A; }
.pill.amber  { background: #FCEDCC; color: #8A5400; }
.pill.red    { background: #F8D6D0; color: #6B1B12; }
.pill.blue   { background: #D7E6F4; color: #1F4E79; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 720px) { .cols2, .cols3 { grid-template-columns: 1fr; } }

footer { padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }

/* login */
.login-shell {
  max-width: 420px; margin: 64px auto;
}
.login-shell h1 { margin: 0 0 4px; }
.login-shell .sub { color: var(--muted); margin-bottom: 18px; }

/* small chart for grouped earnings */
.spark { display: flex; align-items: end; gap: 3px; height: 80px; padding: 4px 0; }
.spark .b { background: var(--red); width: 16px; border-radius: 2px 2px 0 0; min-height: 2px; }

.copybox { background: #FAF5EA; border: 1px dashed #E0B95A; padding: 10px 12px; border-radius: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
