:root { --paper:#F6F7F5; --panel:#fff; --navy:#1F3A5C; --navy-deep:#16293F; --orange:#E07B24; --ink:#1A2430; --muted:#64748A; --line:#E2E5E0; --teal:#2F8F6B; --red:#B0472E; }
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: var(--paper); color: var(--ink); }
h1, h2, h3, .brand-name { font-family: 'Manrope', 'Inter', system-ui, sans-serif; }
.loading { padding: 40px; color: var(--muted); }
.topbar { background: var(--navy-deep); color: #E8EEF3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-tile { background: #fff; border-radius: 10px; width: 48px; height: 40px; display: flex; align-items: center; justify-content: center; }
.logo-tile img { width: 36px; height: auto; display: block; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-name span { color: var(--orange); }
.brand-sub { font-size: 12px; color: #93A5B5; }
.proto { font-size: 11px; font-weight: 600; background: rgba(224,123,36,0.2); color: #F6C79A; padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.who .chip { background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 20px; }
.page { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.narrow { max-width: 440px; margin: 40px auto; padding: 0 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-bottom: 20px; }
.card h1, .card h2 { margin: 0 0 6px; color: var(--navy); }
.card h1 { font-size: 22px; } .card h2 { font-size: 17px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select { padding: 10px 12px; border-radius: 8px; border: 1px solid #CBD2CC; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid rgba(31,58,92,0.25); border-color: var(--navy); }
.pw { display: flex; gap: 8px; } .pw input { flex: 1; min-width: 0; }
.btn { padding: 10px 18px; border-radius: 8px; border: none; background: var(--navy); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost, .mini { background: #fff; color: var(--navy); border: 1px solid #CBD2CC; }
.mini { padding: 5px 10px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.mini.danger { color: var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.msg { font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.msg.err { color: var(--red); font-weight: 600; } .msg.ok { color: var(--teal); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.stat .l { font-size: 12px; color: var(--muted); margin-bottom: 4px; } .stat .v { font-size: 20px; font-weight: 700; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.hero .big { font-family: 'Manrope', sans-serif; font-size: 34px; font-weight: 800; color: var(--navy); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #EEF0EC; vertical-align: middle; }
.scroll { overflow-x: auto; }
.temp { background: #FFF7E8; border: 1px solid #F0DDB0; border-radius: 10px; padding: 14px; margin: 14px 0; }
.temp code { display: inline-block; font-size: 18px; font-weight: 700; letter-spacing: 0.04em; background: #fff; border: 1px solid #F0DDB0; border-radius: 6px; padding: 4px 10px; margin: 6px 0; user-select: all; }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 20px; line-height: 1.6; }
.diag { color: var(--muted); font-size: 12px; margin-top: 6px; }
@media (max-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } .page { padding: 18px 14px 50px; } }

/* ===== the signed-in screens ===== */
:root {
      --paper: #F6F7F5; --panel: #FFFFFF; --navy: #1F3A5C; --navy-deep: #16293F;
      --orange: #E07B24; --ink: #1A2430; --muted: #64748A; --line: #E2E5E0;
      --teal: #2F8F6B; --amber: #C77D2E; --red: #B0472E;
    }
#shell * { box-sizing: border-box; }
#shell h1, #shell h2, #shell h3, #shell .num { font-family: 'Manrope', sans-serif; }
#shell { display: flex; min-height: 100vh; }
#shell .rail { width: 230px; background: var(--navy-deep); color: #E8EEF3; padding: 28px 18px; flex-shrink: 0; }
#shell .brandrow { display: flex; align-items: center; margin-bottom: 8px; }
#shell .logo-tile { background: #fff; border-radius: 11px; width: 54px; height: 46px; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0; margin-right: 11px; }
#shell .logo-tile img { width: 42px; height: auto; display: block; }
#shell .brand { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
#shell .brand .accent { color: var(--orange); }
#shell .tagline { font-size: 12px; color: #93A5B5; margin-bottom: 28px; padding-left: 2px; }
#shell .nav-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; font-size: 14px;
      font-weight: 500; margin-bottom: 4px; color: #CBD8E2; cursor: pointer; }
#shell .nav-item.active { background: rgba(224,123,36,0.16); color: #fff; }
#shell .nav-item.disabled { color: #5D7083; cursor: default; }
#shell .nav-item .soon { margin-left: auto; font-size: 10px; background: #223449; color: #8FA3B5; padding: 2px 7px; border-radius: 20px; }
#shell .identity { margin-top: 28px; padding-top: 16px; border-top: 1px solid #28384A; font-size: 12px; color: #93A5B5;
      line-height: 1.5; word-break: break-all; }
#shell .role-badge { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px;
      border-radius: 20px; background: rgba(255,255,255,0.1); color: #E8EEF3; }
#shell .main { flex: 1; padding: 40px 48px; max-width: 1040px; min-width: 0; }
#shell .org-name { font-size: 26px; font-weight: 700; margin: 0 0 4px 0; }
#shell .fiscal-year { color: var(--muted); font-size: 14px; margin: 0 0 24px 0; }
#shell .page-title { font-size: 24px; font-weight: 700; margin: 0 0 6px 0; }
#shell .page-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px 0; }
#shell .banner { background: #FDF1EC; border: 1px solid #F0CDBC; color: #8A3B20; border-radius: 10px;
      padding: 12px 16px; font-size: 13px; margin-bottom: 24px; }
#shell .hero { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px;
      display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
#shell .hero-label { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
#shell .hero-num { font-size: 42px; font-weight: 800; color: var(--navy); line-height: 1; }
#shell .hero-sub { display: flex; gap: 28px; }
#shell .hero-sub div { text-align: right; }
#shell .small-label { font-size: 12px; color: var(--muted); }
#shell .small-num { font-size: 18px; font-weight: 700; }
#shell .strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
#shell .stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
#shell .stat .label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
#shell .stat .value { font-size: 22px; font-weight: 700; }
#shell .section-title { font-size: 15px; font-weight: 700; margin: 36px 0 14px 0; color: var(--navy); }
#shell .budget-row, #shell .item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
#shell .budget-row .top, #shell .item .top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
#shell .item .top { margin-bottom: 4px; }
#shell .pname { font-weight: 600; }
#shell .pfig, #shell .meta { color: var(--muted); font-size: 13px; }
#shell .bar-track { background: #EDEFEC; border-radius: 6px; height: 8px; overflow: hidden; }
#shell .bar-fill { height: 100%; border-radius: 6px; background: var(--teal); }
#shell .bar-fill.over { background: var(--amber); }
#shell .badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
      background: #E8EEF3; color: var(--navy); white-space: nowrap; }
#shell .badge.restricted { background: #FBEBDD; color: #8A4B14; }
#shell .empty, #shell .loading { color: var(--muted); font-size: 14px; padding: 20px 0; }
#shell .form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; margin-bottom: 28px; }
#shell .form-card h2 { margin: 0 0 4px 0; font-size: 16px; color: var(--navy); }
#shell .form-card .hint-top { margin: 0 0 16px 0; font-size: 13px; color: var(--muted); }
#shell .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
#shell .field { display: flex; flex-direction: column; }
#shell .field.wide { grid-column: 1 / -1; }
#shell .field label { font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
#shell .field input, #shell .field select, #shell .field textarea { padding: 9px 11px; border-radius: 7px; border: 1px solid #CBD2CC;
      font-family: 'Inter', sans-serif; font-size: 14px; background: #fff; color: var(--ink); }
#shell .field textarea { resize: vertical; min-height: 60px; }
#shell .field input:focus, #shell .field select:focus, #shell .field textarea:focus { outline: 2px solid rgba(31,58,92,0.25); border-color: var(--navy); }
#shell .actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
#shell .btn { padding: 10px 20px; border-radius: 8px; border: none; background: var(--navy); color: #fff;
      font-weight: 600; font-size: 14px; cursor: pointer; }
#shell .btn:disabled { opacity: 0.55; cursor: default; }
#shell .msg { font-size: 13px; }
#shell .msg.ok { color: var(--teal); font-weight: 600; }
#shell .msg.err { color: var(--red); font-weight: 600; }
#shell .readonly-note { background: #EEF2F6; border: 1px solid var(--line); color: var(--navy); border-radius: 10px;
      padding: 12px 16px; font-size: 13px; margin-bottom: 24px; }
#shell .userlist { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#shell .user-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
#shell .user-row .email { flex: 1; font-weight: 500; word-break: break-all; }
#shell .user-row select, #shell .add-user select { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--line); font-family: 'Inter', sans-serif; font-size: 13px; }
#shell .link-danger { border: none; background: none; color: var(--red); font-size: 12.5px; cursor: pointer; font-weight: 600; }
#shell .add-user { display: flex; gap: 8px; padding: 14px 16px; flex-wrap: wrap; }
#shell .add-user input { flex: 1; min-width: 160px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); font-family: 'Inter', sans-serif; font-size: 13.5px; }
#shell .add-user .btn { padding: 8px 16px; font-size: 13.5px; }
#shell .hint { font-size: 12px; color: var(--muted); padding: 10px 16px 14px 16px; }
#shell .activity { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#shell .act-row { display: flex; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
#shell .act-row:last-child { border-bottom: none; }
#shell .act-when { color: var(--muted); width: 150px; flex-shrink: 0; }
#shell .act-who { flex: 1; word-break: break-word; }
#shell .warn { background: #FFF7E8; border: 1px solid #F0DDB0; color: #7A5200; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
#shell .pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
#shell .pick-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid #CBD2CC; background: #fff; color: var(--navy);
      font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: 'Inter', sans-serif; }
#shell .pick-btn:hover { background: #EEF2F6; }
#shell .pick-btn:disabled { opacity: 0.5; cursor: default; }
#shell .pick-btn.all { border-color: var(--navy); }
#shell .report-status.working, #shell .report-status.done, #shell .report-status.failed { border: 1px solid var(--line); background: #fff;
      border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 20px; }
#shell .report-status.done { border-color: #BFE0D2; background: #EEF8F3; }
#shell .report-status.failed { border-color: #F0CDBC; background: #FDF1EC; color: var(--red); }
#shell .report-status a { color: var(--navy); font-weight: 700; }
#shell .nav-label { font-size: 11px; font-weight: 600; color: #6F8497; margin: 14px 0 4px 12px; }
#shell .section { margin-bottom: 36px; }
#shell .section-title { font-size: 15px; font-weight: 700; margin: 24px 0 10px 0; color: var(--navy); }
#shell .section-title .meta { font-weight: 500; margin-left: 8px; }
#shell .fhint { font-size: 12px; color: var(--muted); margin-top: 4px; }
#shell .tablewrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
#shell table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
#shell table.grid th { text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#shell table.grid td { padding: 10px 12px; border-bottom: 1px solid #EEF0EC; vertical-align: top; }
#shell table.grid tr:last-child td { border-bottom: none; }
#shell table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
#shell table.grid td.acts { white-space: nowrap; text-align: right; }
#shell .mini { padding: 4px 10px; border-radius: 6px; border: 1px solid #CBD2CC; background: #fff; color: var(--navy); font-size: 12px; font-weight: 600; cursor: pointer; margin-left: 6px; font-family: 'Inter', sans-serif; }
#shell .mini.danger { color: var(--red); }
#shell .btn.small { padding: 7px 14px; font-size: 13px; }
#shell .pay-row td { background: #F6F9FC; }
#shell .pay-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 6px 0; }
#shell .pay-form .field { min-width: 150px; }
#shell .pay-actions { display: flex; gap: 8px; align-items: center; }
#shell .menu-toggle { display: none; width: 100%; margin: 10px 0 0 0; padding: 10px 12px; border-radius: 8px; border: 1px solid #2E4157;
      background: #1D3249; color: #E8EEF3; font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; font-family: 'Inter', sans-serif; }
@media (max-width: 760px) {#shell .menu-toggle { display: block; }
#shell .nav { display: none; }
#shell .rail.open .nav { display: block; }
#shell .rail .tagline { margin-bottom: 4px; }
#shell { flex-direction: column; }
#shell .rail { width: 100%; padding: 16px 18px; }
#shell .main { padding: 24px; }
#shell .strip { grid-template-columns: repeat(2, 1fr); }
#shell .fields { grid-template-columns: 1fr; }
#shell .hero { flex-direction: column; align-items: flex-start; }
#shell .act-row { flex-direction: column; gap: 2px; }

    }

  

.mainwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mainwrap .main { flex: 1; }
#shell .mt4 { margin-top: 4px; } #shell .mt8 { margin-top: 8px; } #shell .sp10 { height: 10px; } #shell .sp18 { height: 18px; }
#shell .meta.overdue { color: var(--red); font-weight: 600; }
#shell .rail .nav-item[data-account] { color: #CBD8E2; }
#shell .other-input { margin-top: 8px; }
#shell .more-rows { margin: 12px 4px 0; color: var(--muted); font-size: 13px; }
#shell [hidden] { display: none !important; }
#shell .hero-num.neg, #shell .small-num.neg { color: var(--red); }
#shell .alert-red { margin: 12px 0; padding: 12px 16px; border-radius: 12px; background: #FDF1EC; border: 1px solid #F0CDBC; color: var(--red); font-weight: 600; }
#shell .list-search { margin: 0 0 12px; }
#shell .list-search input { width: 100%; max-width: 420px; }
#shell .pick-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#shell .pick-input { flex: 1; min-width: 220px; max-width: 420px; }
#shell .logo-preview { margin: 8px 0 14px; min-height: 48px; color: var(--muted); }
#shell .logo-img { max-height: 90px; max-width: 280px; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
#shell .file-btn { display: inline-block; cursor: pointer; }
#shell .logo-preview.pos-Left { text-align: left; }
#shell .logo-preview.pos-Center { text-align: center; }
#shell .logo-preview.pos-Right { text-align: right; }
#shell .logo-preview .logo-img { display: inline-block; }
#shell .logo-img.size-Small { max-height: 40px; max-width: 120px; }
#shell .logo-img.size-Medium { max-height: 64px; max-width: 190px; }
#shell .logo-img.size-Large { max-height: 96px; max-width: 270px; }
.audit-note { font-size: 12.5px; color: #5d6b78; margin: 14px 0 0; }
/* Messages stay in view at the top of the visible area, even when the person has scrolled down the page. */
#shell .report-status.working, #shell .report-status.done, #shell .report-status.failed { position: sticky; top: 12px; z-index: 20; box-shadow: 0 8px 22px rgba(20, 40, 60, 0.2); }
#shell .msg[id^="act-msg-"]:not(:empty) { position: sticky; top: 12px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; box-shadow: 0 8px 22px rgba(20, 40, 60, 0.16); }
#shell .rail { padding-bottom: 56px; }
@media (min-width: 761px) {
  body.in-app { height: 100vh; overflow: hidden; }
  body.in-app #app { height: 100vh; }
  #shell { height: 100vh; min-height: 0; overflow: hidden; }
  #shell .rail { height: 100vh; overflow-y: auto; overscroll-behavior: contain; }
  #shell .mainwrap { height: 100vh; overflow-y: auto; overscroll-behavior: contain; }
}
