/* POPSMITH additions for the account portal and Founders' HQ (on top of app.css). */
.side .brand img { height: 34px; }
.side .brand { padding: 8px 4px; }
.side nav a.is-active { background: var(--ink); }
.main-head h1 { font-family: "Fraunces", Georgia, serif; font-weight: 700; }
.hello-strip { display: flex; align-items: center; gap: 16px; background: var(--ink) url(../img/hero.webp) right 30% / cover no-repeat; color: #fff6e2; border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; position: relative; overflow: hidden; min-height: 120px; }
.hello-strip::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 13, 9, .96) 0%, rgba(18, 13, 9, .85) 45%, rgba(18, 13, 9, .35) 100%); }
.hello-strip > * { position: relative; }
.hello-strip .ring { width: 74px; height: 74px; flex: 0 0 auto; }
.hello-strip b { font-family: "Fraunces", Georgia, serif; font-size: 22px; display: block; }
.hello-strip small { color: #d9c7a5; font-size: 14px; }
.hello-strip .btn { margin-left: auto; }
@media (max-width: 640px) { .hello-strip { flex-wrap: wrap; } .hello-strip .btn { margin-left: 0; } }

/* Tower valves */
.tower-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.valve { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #fff; text-align: left; font: inherit; color: inherit; padding: 0; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; display: flex; flex-direction: column; }
.valve:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.valve .hd { background: var(--c); color: var(--k); padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.valve .hd b { font-family: "Fraunces", Georgia, serif; font-size: 18px; line-height: 1.05; }
.valve .hd span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; white-space: nowrap; }
.valve .bd { padding: 12px 14px 14px; display: grid; gap: 8px; font-size: 13px; }
.valve .lvl { height: 8px; background: var(--stone); border-radius: 999px; overflow: hidden; }
.valve .lvl i { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.valve .row { display: flex; justify-content: space-between; color: var(--muted); }
.valve .row b { color: var(--ink); }
.valve.is-new { box-shadow: 0 0 0 3px var(--accent); }
@media (max-width: 1100px) { .tower-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .tower-grid { gap: 10px; } .valve .hd b { font-size: 15px; } .valve .bd { padding: 10px; font-size: 12px; } }

/* Decision card */
.dec { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; background: var(--paper); scroll-margin-top: calc(var(--bar-h) + 20px); }
.dec h3 { font-size: 18px; margin-bottom: 6px; }
.dec .meta { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.dec-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt { background: #fff; border: 1.5px solid var(--line-2); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.opt.rec { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt .art { aspect-ratio: 1000 / 420; background: var(--c); overflow: hidden; }
.opt .art img { width: 100%; height: 100%; object-fit: cover; }
.opt .badge { position: absolute; top: 10px; right: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.opt .tx { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.opt .tx h4 { font-size: 16px; }
.opt .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt .stats div { background: var(--paper); border-radius: 10px; padding: 8px 10px; }
.opt .stats b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 20px; }
.opt .stats span { font-size: 11.5px; color: var(--muted); }
.opt ul { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.opt ul.cons li { color: var(--muted); }
.opt .btn { margin-top: auto; }
.why-box { background: #fff; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 8px; font-size: 14px; margin: 14px 0 0; }
.why-box b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dec-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.dec.done { background: var(--ok-soft); border-color: #cfe5d6; }
@media (max-width: 760px) { .dec-opts { grid-template-columns: 1fr; } }

/* Tickets */
.ticket { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.ticket .top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.ticket h3 { font-size: 16px; }
.ticket p { font-size: 14px; color: var(--ink-2); margin: 8px 0 12px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 12px; }
.steps3 div { font-size: 12.5px; font-weight: 700; color: var(--muted); border-top: 4px solid var(--line); padding-top: 6px; }
.steps3 div.on { color: var(--ok); border-color: var(--ok); }
.ticket ul { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.ticket.is-new { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Order lines */
.lines { display: flex; flex-wrap: wrap; gap: 5px; }
.lines span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; background: var(--stone); border-radius: 999px; padding: 3px 9px 3px 4px; white-space: nowrap; }
.lines span i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-style: normal; font-size: 10px; color: var(--k); font-weight: 800; }
.qty-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.qty-row i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.qty-row .stepper { display: flex; align-items: center; gap: 8px; }
.qty-row .stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.qty-row .stepper output { min-width: 22px; text-align: center; font-weight: 800; }
.qty-row small { display: block; color: var(--muted); font-size: 12.5px; }

/* Docs */
.docs2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.doc2 { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.doc2:hover { border-color: var(--ink); }
.doc2 .ic { width: 40px; height: 48px; border-radius: 6px; background: var(--ink); color: #f2c230; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .06em; flex: 0 0 auto; }
.doc2 b { display: block; font-size: 14px; }
.doc2 small { color: var(--muted); font-size: 12.5px; }
.paperdoc { background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; padding: 22px; font-size: 14px; }
.paperdoc h3 { font-family: "Fraunces", Georgia, serif; font-size: 22px; margin-bottom: 4px; }
.paperdoc .wm { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 14px; }
.nf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .nf-grid { grid-template-columns: 1fr; } }
.nf { border: 2px solid #111; padding: 10px 12px; font-size: 13px; background: #fff; color: #111; }
.nf h4 { font-family: "Arial Black", var(--sans); font-size: 18px; border-bottom: 1px solid #111; padding-bottom: 4px; margin-bottom: 4px; }
.nf .row { display: flex; justify-content: space-between; border-bottom: 1px solid #999; padding: 3px 0; }
.nf .row.big { font-weight: 900; font-size: 18px; border-bottom: 5px solid #111; }
.nf .row.in { padding-left: 14px; }
.nf .ing { margin: 8px 0 0; font-size: 12px; font-weight: 700; line-height: 1.4; }

/* HQ */
.kpi { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi .lbl { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.kpi .val { font-family: "Fraunces", Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.05; }
.kpi .hint { font-size: 12.5px; color: var(--muted); }
.kpi.dark { background: var(--ink); color: #fff6e2; border-color: var(--ink); }
.kpi.dark .lbl, .kpi.dark .hint { color: #cdbb98; }
.prio-item .ico.runout { background: #fdecc8; color: #8a5a00; }
.days { font-weight: 800; font-variant-numeric: tabular-nums; }
.days.bad { color: var(--danger); }
.days.warn { color: var(--warn); }
.days.ok { color: var(--ok); }
.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.acc { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; background: #fff; display: grid; gap: 8px; }
.acc.is-new { box-shadow: 0 0 0 3px var(--accent); }
.acc b { font-size: 15px; }
.acc small { color: var(--muted); font-size: 12.5px; }
.acc .dots { display: flex; gap: 4px; flex-wrap: wrap; }
.acc .dots i { width: 16px; height: 22px; border-radius: 4px; background: var(--c); border: 1px solid rgba(0, 0, 0, .15); }
.terr { display: grid; gap: 8px; }
.terr-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; }
.terr-row b { font-size: 14.5px; display: block; }
.terr-row small { color: var(--muted); font-size: 12.5px; }
.terr-row .r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fbars { display: grid; gap: 10px; }
.fbar { display: grid; grid-template-columns: 120px 1fr 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.fbar .t { height: 22px; background: var(--stone); border-radius: 6px; overflow: hidden; }
.fbar .t i { display: block; height: 100%; background: var(--c); border-radius: 6px; transition: width .9s var(--ease); }
.fbar b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .fbar { grid-template-columns: 96px 1fr 32px; font-size: 12.5px; } }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.lib button { text-align: left; font: inherit; color: inherit; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; padding: 0; cursor: pointer; }
.lib button:hover { border-color: var(--ink); }
.lib img { width: 100%; aspect-ratio: 1000 / 420; object-fit: cover; background: var(--c); }
.lib .tx { padding: 10px 12px; font-size: 13px; }
.lib .tx b { display: block; font-size: 15px; }
.lib .tx small { color: var(--muted); }
.lead-detail dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 14px; margin: 0 0 16px; }
.lead-detail dt { color: var(--muted); font-weight: 700; }
.lead-detail dd { margin: 0; }
.lead-detail ul { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
@media (max-width: 520px) { .lead-detail dl { grid-template-columns: 1fr; gap: 2px; } .lead-detail dd { margin-bottom: 8px; } }
.mobile-tabs a { white-space: nowrap; }
