/* dash.aduh.dev — design system
   Neo-brutalist, mobile-first. Translated from the Claude Design wireframes
   ("the money dashboard as a system you monitor · aduh! → ahh").
   Palette + type + signature components live here so templates stay clean. */

:root {
  --ink:      #191f1c;
  --ink-soft: #2c332e;
  --paper:    #e4e7e1;
  --panel:    #eff2ec;
  --line:     #ccd2cb;
  --muted:    #5e655f;
  --muted-d:  #9aa19a;
  --accent:   #e0531e; /* aduh! — alerts, over-budget, active marker */
  --ok:       #0f7d8c; /* ahh — on track, positive */
  --teal2:    #4bb8c4;
  --cream:    #fff8ef;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-card: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; }
@keyframes pulseDot { 0%,100%{opacity:1} 50%{opacity:.3} }

html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- app shell ---------------------------------------------------------- */
.app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  /* room for the fixed tab bar incl. the iOS home-indicator safe area */
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  background: var(--paper);
}
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  /* sit just below the status bar / notch when installed as a PWA */
  padding: calc(env(safe-area-inset-top) + 6px) 20px 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
}
.brand { font-weight: 800; letter-spacing: -.02em; font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; }
.brand .dot-sep { color: var(--accent); }
.appbar a { color: var(--muted); text-decoration: none; }
.appbar a:hover { color: var(--ink); }
.statuschip { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }

.main { padding: 4px 20px 18px; }

/* ---- bottom tab bar ----------------------------------------------------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 460px;
  display: flex; background: var(--panel); border-top: 1.5px solid var(--ink);
  /* lift the tabs above the iPhone home indicator */
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; text-align: center; padding: 13px 0 13px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted);
  text-decoration: none; letter-spacing: .02em;
}
.tab.active { color: var(--ink); border-top: 2px solid var(--accent); margin-top: -1.5px; }

/* ---- typography helpers ------------------------------------------------- */
.h1 { font-weight: 800; font-size: 27px; letter-spacing: -.03em; margin: 0; }
.h2 { font-weight: 800; font-size: 22px; letter-spacing: -.03em; margin: 0; }
.serif { font-family: 'Instrument Serif', serif; font-style: italic; }
.mono  { font-family: 'IBM Plex Mono', monospace; }
.label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted);
         letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.ok { color: var(--ok); }

/* ---- cards & panels ----------------------------------------------------- */
.card {
  background: var(--panel); border: 1.5px solid var(--ink); border-radius: 16px;
  padding: 15px 16px; box-shadow: var(--shadow-card);
}
.card--accent { box-shadow: 3px 3px 0 var(--accent); }
.card--dark { background: var(--ink); color: var(--paper); box-shadow: none; }
.card--dark .label, .card--dark .muted { color: var(--muted-d); }
.panel {
  background: var(--panel); border: 1.5px solid var(--ink); border-radius: 13px; overflow: hidden;
}
.panel--soft { border-color: var(--line); }

/* ---- pills, chips, buttons --------------------------------------------- */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  border: 1.5px solid var(--line); color: var(--muted);
  border-radius: 20px; padding: 5px 13px; background: transparent; text-decoration: none;
}
.pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 6px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 5px;
}
.chip--ok { color: var(--ok); }
.chip--accent { color: var(--accent); background: rgba(224,83,30,.10); border-color: transparent; }
.btn {
  display: block; width: 100%; text-align: center; cursor: pointer;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 14px;
  border: 1.5px solid var(--ink); border-radius: 12px; padding: 12px;
  background: var(--paper); color: var(--ink); text-decoration: none;
}
.btn--accent { background: var(--accent); color: var(--cream); box-shadow: var(--shadow-card); border-color: var(--ink); }
.btn--ok { background: var(--ok); color: var(--cream); border-color: var(--ink); }

/* ---- status dot --------------------------------------------------------- */
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.dot--ok { background: var(--ok); }
.dot--accent { background: var(--accent); }
.dot--teal2 { background: var(--teal2); }
.dot.pulse { animation: pulseDot 2.4s infinite; }

/* ---- budget ruler & bars ----------------------------------------------- */
.ruler { position: relative; height: 16px; border-radius: 6px; overflow: hidden;
         border: 1px solid var(--line); }
.ruler__zone { position: absolute; top: 0; height: 100%; }
.ruler__mark { position: absolute; top: -1px; bottom: -1px; width: 2.5px; background: var(--ink); }
.bar { position: relative; height: 8px; border-radius: 5px; overflow: hidden; background: var(--line); }
.bar__fill { position: absolute; top: 0; left: 0; height: 100%; }

/* ---- list rows ---------------------------------------------------------- */
.row { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: 600; font-size: 14px; }
.row__sub { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); }
.row__amt { font-weight: 600; font-size: 14px; font-family: 'IBM Plex Mono', monospace; }
.row--flag { padding: 11px 12px; margin: 9px 0; background: rgba(224,83,30,.07);
             border: 1.5px solid var(--accent); border-radius: 12px; }

.daygroup { display: flex; justify-content: space-between; align-items: center;
            padding: 10px 0 7px; border-bottom: 1.5px solid var(--ink); }

/* ---- launcher grid ------------------------------------------------------ */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.tile { background: var(--panel); border: 1.5px solid var(--ink); border-radius: 12px;
        padding: 11px 10px; text-decoration: none; color: var(--ink); display: block; }
.tile__k { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--muted); }
.tile__v { font-weight: 800; font-size: 14px; margin-top: 3px; }

/* horizontal scrollers (kanban / calendars) */
.hscroll { display: flex; gap: 10px; width: max-content; }
.hwrap { overflow-x: auto; margin: 0 -20px; padding: 2px 20px 6px; }

.note { margin-top: 12px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- review queue inputs ----------------------------------------------- */
.rev-input {
  width: 100%; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 9px;
  padding: 9px 11px; font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: var(--ink);
}
.rev-input:focus { outline: none; box-shadow: var(--shadow-card); }
select.rev-input { font-family: 'Bricolage Grotesque', sans-serif; -webkit-appearance: none; appearance: none; }
.review-card { margin-top: 13px; }

/* inline edit/delete actions on feed rows — clearly visible tap targets */
.row__actions { display: flex; gap: 6px; flex: none; }
.row__del {
  flex: none; cursor: pointer; border: 1.5px solid var(--line);
  width: 30px; height: 30px; border-radius: 8px; background: var(--panel);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: var(--muted); padding: 0;
}
.row__del--edit { color: var(--ink); }
.row__del--del  { color: var(--accent); }
.row__del:hover { border-color: var(--ink); }
.row__del:active { transform: scale(.92); }
.htmx-request.row, .row.htmx-request { opacity: .45; }
