/* HomeBase (from the Top Gun Vault hub look). Header: Top Gun Transfer 1.2.4 (every Top Gun app). Body: Accounting's
   Option B light look (light grey page, white cards, quiet text links, no chunky buttons). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13px/1.38 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif; background: #eceef2; color: #393a3d; }
a { color: #0077c5; }
button, input { font: inherit; }

/* ---- header (Transfer 1.2.4) ---- */
.tg-app-header { background: #161616; border-bottom: 1px solid #3d3d3d; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: #e8e8e8; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 36px; height: 36px; display: block; flex-shrink: 0; }
.brand h1 { margin: 0; font: 400 26px/1 "Bebas Neue", "Oswald", system-ui, sans-serif; letter-spacing: .04em; color: #e8e8e8; }
.brand .tag { color: #9a9a9a; font: 12px "Oswald", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; display: block; margin-top: 3px; }
.header-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-meta .tag { color: #9a9a9a; font: 12px "Oswald", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; margin-top: 0; }
.header-meta .version-check { display: contents; }
.header-meta .commit { font: 10px "Oswald", system-ui, sans-serif; color: #6f6f6f; letter-spacing: .04em; margin-left: -8px; }
.header-meta .commit[hidden], #new-build[hidden], #update-status[hidden], #update-action[hidden] { display: none; }
#new-build, #check-updates, #update-status, #update-action { font: 12px "Oswald", system-ui, sans-serif; color: #9a9a9a; letter-spacing: .08em; text-transform: none; }
#app-version, #app-commit, #check-updates, #update-status, #update-action, #new-build { flex-shrink: 0; }
#update-status { max-width: 280px; white-space: normal; line-height: 1.35; }
#update-status.err { color: #e57373; }
#new-build, #check-updates, #update-action { background: transparent; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
#check-updates:hover, #update-action:hover, #new-build:hover { color: #c8c8c8; }
#sign-out-btn { background: #3a3a3a; border: 1px solid #3d3d3d; color: #e8e8e8; padding: 6px 12px; border-radius: 4px; cursor: pointer; font: 12px "Segoe UI", system-ui, sans-serif; }
#sign-out-btn:hover { background: #484848; }

/* ---- page ---- */
main { max-width: 1240px; margin: 0 auto; padding: 18px 24px 32px; }
.page-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.page-head h2 { margin: 0; font-size: 18px; font-weight: 600; color: #2b2c2e; }
.muted { color: #6b6c72; }
.small { font-size: 12px; }
.tlink { background: none; border: 0; padding: 0; color: #0077c5; font: 500 12px "Segoe UI", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.group { margin: 0 0 20px; }
.group h3 { margin: 0 0 8px; font: 600 11px "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6b6c72; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 10px; min-height: 112px; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 14px 14px 12px; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
a.tile:hover { border-color: #b9c3cf; box-shadow: 0 2px 8px rgba(30, 40, 60, .08); }
a.tile:focus-visible { outline: 2px solid #0077c5; outline-offset: 2px; }
.tile.no-link { background: #fafbfc; }
.tile-top { display: flex; align-items: flex-start; gap: 12px; }
.tile-icon { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.tile-icon svg { width: 22px; height: 22px; }
.tile-name { font-size: 14px; font-weight: 600; color: #2b2c2e; line-height: 1.25; }
.tile-desc { font-size: 12px; color: #6b6c72; margin-top: 2px; }
.tile-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b6c72; }
.tile-foot .open { margin-left: auto; color: #0077c5; text-decoration: underline; text-underline-offset: 2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.up { background: #2ca01c; box-shadow: 0 0 0 3px rgba(44, 160, 28, .14); }
.dot.down { background: #d52b1e; box-shadow: 0 0 0 3px rgba(213, 43, 30, .14); }
.dot.unknown { background: #a5a8ad; }
.share-note { font-size: 11px; color: #8d9096; }
.admin-note { margin-top: 18px; font-size: 12px; color: #6b6c72; border-top: 1px solid #dcdfe4; padding-top: 10px; }
.admin-note code { font: 11px ui-monospace, Menlo, monospace; background: #e3e6eb; padding: 1px 4px; border-radius: 3px; }
.problem { color: #8a1c1c; }

/* ---- sign-in ---- */
.signin { max-width: 340px; margin: 48px auto; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 20px 22px; }
.signin h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.signin label { display: block; margin-top: 12px; font-size: 12px; color: #4b4c52; }
.signin input { display: block; width: 100%; margin-top: 4px; height: 30px; padding: 0 8px; border: 1px solid #8d9096; border-radius: 3px; background: #fff; color: #393a3d; }
.signin input:focus { outline: none; border-color: #0077c5; box-shadow: 0 0 0 2px rgba(0, 119, 197, .18); }
.signin .row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.btn { height: 28px; padding: 0 14px; border-radius: 3px; border: 1px solid #2ca01c; background: #2ca01c; color: #fff; font: 600 12px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.btn:hover { background: #108000; }
.btn:disabled { opacity: .6; cursor: default; }
.error { color: #8a1c1c; font-size: 12px; margin: 10px 0 0; }

a.brand { color: inherit; text-decoration: none; }

/* ---- Option B top menu (Accounting style) ---- */
.menu { display: flex; align-items: center; gap: 2px; background: #fff; border-bottom: 1px solid #dcdfe4; padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { padding: 9px 12px 8px; color: #393a3d; text-decoration: none; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.menu a:hover { color: #0077c5; }
.menu a.on { border-bottom-color: #2ca01c; color: #2b2c2e; font-weight: 600; }
.menu-user { margin-left: auto; font-size: 12px; color: #6b6c72; white-space: nowrap; padding-left: 12px; }
.page-head { flex-wrap: wrap; }
.page-head a { color: #0077c5; }

/* ---- doors ---- */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.door { display: flex; flex-direction: column; gap: 12px; min-height: 168px; background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 16px 16px 12px; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.door:hover { border-color: #b9c3cf; box-shadow: 0 2px 8px rgba(30, 40, 60, .08); }
.door.later { background: #fafbfc; }
.door-top { display: flex; gap: 12px; align-items: flex-start; }
.door-icon { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.door-icon svg { width: 23px; height: 23px; }
.door-name { font-size: 15px; font-weight: 600; color: #2b2c2e; }
.door-desc { font-size: 12px; color: #6b6c72; margin-top: 2px; }
.door-stats { display: flex; gap: 18px; border-top: 1px solid #eff1f4; padding-top: 10px; }
.door-stats div { display: flex; flex-direction: column; }
.door-stats b { font-size: 15px; color: #2b2c2e; font-weight: 600; }
.door-stats span { font-size: 11px; color: #6b6c72; }
.door-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b6c72; }
.door-foot .open { margin-left: auto; color: #0077c5; text-decoration: underline; text-underline-offset: 2px; }
.foot-links { margin-top: 16px; color: #6b6c72; }

/* ---- money ---- */
.subtabs { display: flex; gap: 14px; margin-left: 8px; }
.subtabs a { font-size: 12px; color: #0077c5; text-decoration: underline; text-underline-offset: 2px; }
.subtabs a.on { color: #2b2c2e; text-decoration: none; font-weight: 600; }
.note { background: #fff8e6; border: 1px solid #f0d58c; border-radius: 4px; padding: 7px 10px; font-size: 12px; color: #5c4a12; margin: 0 0 12px; }
.note.err { background: #fdecea; border-color: #f2b8b5; color: #8a1c1c; }
.note .tlink { margin-left: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 11px; color: #6b6c72; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat b { font-size: 20px; color: #2b2c2e; font-weight: 600; }
.stat b small { font-size: 12px; color: #6b6c72; font-weight: 400; margin-left: 1px; }
.stat em { font-style: normal; font-size: 11px; color: #6b6c72; }
.stat.good b { color: #108000; }
.card { background: #fff; border: 1px solid #dcdfe4; border-radius: 6px; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 12px; border-bottom: 1px solid #dcdfe4; }
.card-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: #2b2c2e; }
.card-body { padding: 12px 14px; }
.filters { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.tlink.on { color: #2b2c2e; text-decoration: none; font-weight: 600; }
table.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-size: 11px; font-weight: 600; color: #6b6c72; text-transform: uppercase; letter-spacing: .05em; padding: 7px 12px; background: #f4f5f8; border-bottom: 1px solid #dcdfe4; }
.ledger td { padding: 8px 12px; border-bottom: 1px solid #dcdfe4; vertical-align: middle; }
.ledger tbody tr:nth-child(even) td { background: #eff1f4; }
.ledger tbody tr:hover td { background: #e6f1fa; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger .nm { font-weight: 600; color: #2b2c2e; }
.ledger .sub { font-size: 11px; color: #6b6c72; margin-top: 1px; }
.ledger .lbl { display: none; }
.ledger .empty { text-align: center; padding: 18px; }
.ledger .c-act { text-align: right; white-space: nowrap; font-size: 12px; }
.ledger .c-due, .ledger .c-cad { white-space: nowrap; }
.mark { background: none; border: 1px solid transparent; padding: 1px 6px; border-radius: 10px; font: 12px "Segoe UI", system-ui, sans-serif; color: #0077c5; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.mark:hover { color: #005a96; }
.mark.on { text-decoration: none; font-weight: 600; }
.mark.on.keep { color: #108000; border-color: #9fd59a; background: #eef8ec; }
.mark.on.cancel { color: #a3261b; border-color: #efb1ab; background: #fdeeec; }
.mark.on.unsure { color: #7a5a00; border-color: #e9cf83; background: #fff8e3; }
.sep { color: #b4b7bd; margin: 0 1px; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; background: #e3e6eb; color: #4b4c52; vertical-align: 1px; }
.chip.warn { background: #fff1d6; color: #7a5a00; }
.fine { margin-top: 10px; }

/* guide */
.guide { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.steps { margin: 0 0 10px; padding-left: 20px; }
.steps li { margin: 4px 0; }
.callout { border-left: 3px solid #f0b429; background: #fffaf0; padding: 6px 10px; margin: 8px 0; font-size: 12px; }
.guide-mark { margin: 12px 0 4px; font-size: 12px; color: #4b4c52; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; margin: 0; padding: 12px 14px 4px; font-size: 12px; }
.facts dt { color: #6b6c72; }
.facts dd { margin: 0; color: #2b2c2e; word-break: break-word; }
.side p { padding: 0 14px 6px; }

/* calendar */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { font-size: 11px; font-weight: 600; color: #6b6c72; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; background: #f4f5f8; border-bottom: 1px solid #dcdfe4; }
.cal-cell { min-height: 84px; border-right: 1px solid #eff1f4; border-bottom: 1px solid #eff1f4; padding: 4px 5px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.blank { background: #fafbfc; }
.cal-cell.today { background: #f2f8fd; }
.cal-cell.today .cal-d { background: #0077c5; color: #fff; border-radius: 9px; padding: 0 6px; }
.cal-d { font-size: 11px; color: #6b6c72; align-self: flex-start; }
.cal-item { display: flex; justify-content: space-between; gap: 4px; font-size: 11px; line-height: 1.3; padding: 1px 4px; border-radius: 3px; text-decoration: none; color: #1f3d1c; background: #eaf6e8; border-left: 3px solid #2ca01c; overflow: hidden; }
.cal-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item b { font-weight: 600; white-space: nowrap; }
.cal-item.bill { background: #e8f1fb; border-left-color: #1d6fc4; color: #173a5e; }
.cal-item.trial { background: #fff4dc; border-left-color: #e0a100; color: #5c4a12; }
.cal-item.cancel { background: #fdeeec; border-left-color: #d52b1e; color: #7c1f17; text-decoration: line-through; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; padding: 8px 12px; color: #6b6c72; }
.legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: #2ca01c; }
.lg.bill { background: #1d6fc4; } .lg.trial { background: #e0a100; } .lg.cancel { background: #d52b1e; }
.up-list { list-style: none; margin: 0; padding: 0; }
.up-list li { display: flex; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #eff1f4; }
.up-list li:nth-child(even) { background: #f7f8fa; }
.up-date { font-size: 12px; color: #6b6c72; width: 78px; flex-shrink: 0; font-variant-numeric: tabular-nums; padding-top: 1px; }
.up-main a { font-weight: 600; }
.up-links { margin-top: 2px; color: #b4b7bd; }
.up-links a { font-weight: 400; }

/* prose + plans */
.prose h3 { font-size: 14px; margin: 6px 0 6px; }
.prose ul { padding-left: 18px; margin: 0 0 12px; }
.prose li { margin: 6px 0; line-height: 1.45; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 12px; }
.plan h3 { margin: 0; font-size: 14px; }
.plan .price { font-size: 24px; font-weight: 600; color: #2b2c2e; margin: 4px 0 8px; }
.plan .price small { font-size: 12px; color: #6b6c72; font-weight: 400; }
.plan ul { padding-left: 18px; margin: 0 0 12px; }
.plan li { margin: 4px 0; }
.plan.best { border-color: #9fd59a; }

/* ---- iPhone / narrow ---- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-wrap, .guide { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tg-app-header { padding: 8px 12px; gap: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .brand img { width: 30px; height: 30px; }
  .brand h1 { font-size: 22px; }
  .brand .tag { display: none; }
  .header-meta { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .menu { padding: 0 6px; }
  .menu a { padding: 8px 9px 7px; }
  .menu-user { display: none; }
  main { padding: 12px 12px 24px; }
  .page-head h2 { font-size: 16px; }
  .subtabs { margin-left: 0; }
  .doors { grid-template-columns: 1fr; gap: 10px; }
  .door { min-height: 0; padding: 12px; gap: 10px; }
  .stats { gap: 8px; }
  .stat { padding: 8px 10px; }
  .stat b { font-size: 17px; }
  .card-head .filters { margin-left: 0; width: 100%; gap: 10px; }
  .ledger thead { display: none; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 9px 12px; border-bottom: 1px solid #dcdfe4; }
  .ledger tbody tr:nth-child(even) { background: #eff1f4; }
  .ledger td, .ledger tbody tr:nth-child(even) td, .ledger tbody tr:hover td { padding: 0; border: 0; background: transparent; width: auto; }
  .ledger .c-name { grid-column: 1; }
  .ledger .c-amt { grid-column: 2; grid-row: 1; font-weight: 600; }
  .ledger .c-cad { grid-column: 2; grid-row: 2; text-align: right; font-size: 11px; color: #6b6c72; }
  .ledger .c-due { grid-column: 1; grid-row: 2; font-size: 12px; color: #4b4c52; }
  .ledger .lbl { display: inline; color: #6b6c72; }
  .ledger .c-mark { grid-column: 1; margin-top: 4px; }
  .ledger .c-act { grid-column: 2; align-self: end; }
  .mark { padding: 3px 7px; }
  .cal-cell { min-height: 48px; padding: 2px; }
  .cal-dow { padding: 4px 2px; text-align: center; font-size: 10px; }
  .cal-d { font-size: 10px; }
  .cal-item { font-size: 0; padding: 0; height: 5px; border-left-width: 0; border-radius: 3px; background: #2ca01c; }
  .cal-item.bill { background: #1d6fc4; } .cal-item.trial { background: #e0a100; } .cal-item.cancel { background: #d52b1e; }
  .plans { grid-template-columns: 1fr; }
  .signin { margin: 24px 12px; }
}
