/* Look and feel follows the appraisal prototype's design system
   (AL Clients/NTUC/04 Prototype/moderation/DESIGN_SYSTEM.md): Work Sans, brand red #e91627,
   the one gray palette, 44px controls, bordered white cards, Lucide icons. */
:root{
  --brand:#e91627; --brand-subtle:#fbd2d6;
  --white:#ffffff;
  --g50:#f9f8f8; --g100:#f0f0f0; --g200:#e8e8e8; --g300:#cccccc; --g400:#a8a8a8; --g500:#888888;
  --g600:#666666; --g700:#4d4d4d; --g800:#333333; --g900:#1a1a1a; --g950:#121212;
  --primary:var(--g950); --secondary:var(--g800); --soft:var(--g600); --tertiary:var(--g500); --disabled:var(--g400);
  --surface:var(--g50); --surface-2:var(--white); --border:var(--g200);
  --green:#16a34a; --green-strong:#15803d; --green-subtle:#f0fcf4; --green-muted:#bbf7d0;
  --amber:#ffbd3b; --amber-subtle:#fff4dc; --teal:#0f85a7; --teal-subtle:#e2ebeb;
  --danger:#dc3545;
}
*{box-sizing:border-box}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{margin:0;font-family:"Work Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;color:var(--primary);background:var(--surface);-webkit-font-smoothing:antialiased;min-width:0}
a{color:var(--primary)}
*:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.ic{display:inline-block;flex:none;vertical-align:-3px}
h1{font-size:24px;line-height:32px;font-weight:600;margin:0}
h2{font-size:20px;line-height:28px;font-weight:600;margin:0 0 12px}
h3{font-size:16px;line-height:24px;font-weight:600;margin:0 0 6px}
p{margin:0 0 10px}
.muted{color:var(--soft)}
.small{font-size:14px;line-height:20px}
.eyebrow{font-size:14px;line-height:20px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--soft);margin:0 0 2px}
.eyebrow.red{color:var(--brand);display:flex;gap:6px;align-items:center}

/* header: 4px brand strip, 56px white bar (App header recipe) */
.strip{height:4px;background:var(--brand)}
.top{background:var(--surface-2);border-bottom:1px solid var(--border);min-height:56px;padding:6px 16px;display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--primary);font-weight:600;white-space:nowrap}
.brand .mark{width:28px;height:28px;border-radius:6px;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:500}
.nav{display:flex;flex-wrap:wrap;gap:4px;flex:1 1 auto;min-width:0}
.nav a{display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;text-decoration:none;color:var(--soft);font-weight:600;white-space:nowrap}
.nav a:hover{background:var(--surface);color:var(--primary)}
.nav a.on{background:var(--primary);color:#fff}
.nav .count{display:inline-block;min-width:20px;padding:0 6px;border-radius:9999px;background:var(--brand);color:#fff;font-size:12px;line-height:18px;text-align:center}
.tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:14px}
.tools .lbl{color:var(--soft)}

.main{max-width:1180px;margin:0 auto;padding:24px 24px 48px;outline:none}
@media (max-width:480px){.main{padding:16px 12px 40px}}
.pagehead{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;justify-content:space-between;margin-bottom:20px}
.pagehead .sub{color:var(--soft);margin:4px 0 0}

/* surfaces */
.card{background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:20px;margin-bottom:16px;min-width:0}
.card.flush{padding:0;overflow:hidden}
.card.flush>.pad{padding:16px 20px}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px}
.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.spread{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}

/* stat tiles, as on the appraisal HR screen */
.figs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.fig{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:10px 14px;min-width:0}
.fig b{display:block;font-size:20px;line-height:28px;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.fig span{display:block;font-size:14px;line-height:20px;color:var(--soft)}
.fig.alert{background:var(--brand-subtle);border-color:var(--brand-subtle)} .fig.alert b,.fig.alert span{color:var(--brand)}
@media (max-width:520px){.figs{grid-template-columns:repeat(2,minmax(0,1fr))}}
.bar{height:8px;border-radius:9999px;background:var(--border);overflow:hidden;display:flex}
.bar i{display:block;height:100%}
.bar .a{background:var(--primary)} .bar .p{background:var(--g500)}

/* status badge: pill with a dot */
.status-badge{display:inline-flex;align-items:center;gap:6px;border-radius:9999px;padding:2px 10px;font-size:14px;line-height:20px;font-weight:500;border:1px solid var(--border);background:var(--surface);color:var(--primary);white-space:nowrap}
.status-badge::before{content:"";width:6px;height:6px;border-radius:9999px;background:var(--g600)}
.status-badge.ok{background:var(--green-subtle);border-color:var(--green-muted);color:var(--green-strong)} .status-badge.ok::before{background:var(--green)}
.status-badge.wait{background:var(--surface);color:var(--primary)}
.status-badge.back{background:var(--amber-subtle);border-color:#ffe2a6;color:#8a5a00} .status-badge.back::before{background:var(--amber)}
.status-badge.no{background:var(--brand-subtle);border-color:#f6b3ba;color:var(--brand)} .status-badge.no::before{background:var(--brand)}
.status-badge.info{color:var(--soft)}
.chip{display:inline-block;padding:0 6px;border-radius:6px;font-size:12px;line-height:18px;font-weight:500;background:var(--g100);color:var(--soft);white-space:nowrap}
.chip.new{background:var(--brand-subtle);color:var(--brand)}
.note{display:inline-flex;gap:6px;align-items:flex-start;font-size:12px;line-height:18px;color:var(--soft);background:var(--g100);border-radius:6px;padding:3px 8px}

/* buttons: brand, secondary, ghost; 44px */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:44px;padding:10px 16px;border-radius:8px;font:inherit;font-size:16px;line-height:24px;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap;
  background:var(--surface-2);color:var(--secondary);border:1px solid var(--g300);transition:background-color .15s}
.btn:hover{background:var(--surface)}
.btn.primary{background:var(--brand);color:#fff;border:2px solid transparent}
.btn.primary:hover{background:#d01422}
.btn.danger{background:transparent;color:var(--brand);border:2px solid transparent}
.btn.danger:hover{background:var(--surface)}
.btn.small{height:36px;padding:6px 12px;font-size:14px;line-height:20px}
.btn[disabled]{opacity:.4;cursor:not-allowed}
.btn.full{width:100%}
.linkbtn{background:none;border:0;color:var(--primary);padding:0;font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.iconbtn{background:none;border:0;padding:2px;border-radius:6px;color:var(--soft);cursor:pointer;display:inline-flex}
.iconbtn:hover{color:var(--primary);background:var(--surface)}

/* fields: 44px shell */
label.f{display:block;font-size:14px;line-height:20px;font-weight:500;color:var(--soft);margin-bottom:4px}
input[type=text],input[type=email],input[type=number],input[type=date],select,textarea{font:inherit;font-size:16px;font-weight:500;height:44px;padding:0 12px;border:1px solid var(--g300);border-radius:8px;background:var(--surface-2);color:var(--primary);width:100%;max-width:100%}
input::placeholder,textarea::placeholder{color:var(--tertiary);font-weight:400}
input:focus,select:focus,textarea:focus{outline:none;border:2px solid var(--soft);background:var(--surface);padding:0 11px}
textarea{height:auto;min-height:88px;padding:10px 12px}
textarea:focus{padding:9px 11px}
select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;background-size:13px}
select:focus{padding-right:35px}
select.auto{width:auto}
.tools select,.tools input[type=date]{height:36px;font-size:14px}
.field{margin-bottom:14px;min-width:0}
.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:0 12px}
.check{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.check input{margin-top:4px;width:16px;height:16px;accent-color:var(--primary);flex:none}
.radio{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--g300);border-radius:8px;padding:12px 14px;margin-bottom:8px;cursor:pointer}
.radio input{margin-top:4px;accent-color:var(--primary);flex:none}
.radio:has(input:checked){border:2px solid var(--primary);padding:11px 13px}
.radio:has(input:disabled){opacity:.55;cursor:not-allowed}

/* messages (alert panel and success, as the toast colours) */
.msg{padding:12px 14px;border-radius:8px;margin-bottom:16px;border:1px solid var(--border);background:var(--surface-2)}
.msg.ok{border-color:var(--primary);color:var(--primary)}
.msg.bad{border-color:#f6b3ba;background:var(--brand-subtle);color:var(--brand)}
.msg.warn{border-color:#ffe2a6;background:var(--amber-subtle);color:#6b4600}
.msg ul{margin:4px 0 0;padding-left:20px}

/* tables, as the appraisal data table */
.tablewrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
table{border-collapse:collapse;width:100%;font-size:16px}
th{text-align:left;padding:12px 16px;font-size:14px;line-height:20px;font-weight:500;color:var(--soft);border-bottom:1px solid var(--border);white-space:nowrap;background:var(--surface)}
td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--border);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
td.num,th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
td.strong{font-weight:600}
tr.click{cursor:pointer} tr.click:hover td{background:var(--surface)}
.dense td{padding:10px 16px}

/* receipts */
.receipt{display:grid;grid-template-columns:120px minmax(0,1fr);gap:16px;border:1px solid var(--border);border-radius:8px;padding:14px;margin-bottom:12px;background:var(--surface-2)}
.receipt img{width:120px;height:150px;object-fit:cover;border:1px solid var(--border);border-radius:6px;background:var(--surface)}
@media (max-width:520px){.receipt{grid-template-columns:minmax(0,1fr)} .receipt img{width:100%;height:170px;object-fit:contain}}
.step{display:flex;align-items:center;gap:10px;margin:22px 0 12px}
.step .n{width:28px;height:28px;border-radius:9999px;background:var(--primary);color:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;flex:none}
.step h2{margin:0}
.timeline{list-style:none;margin:0;padding:0}
.timeline li{padding:6px 0 6px 16px;border-left:2px solid var(--border);font-size:14px;line-height:20px}

/* chat */
.chat{display:flex;flex-direction:column;gap:8px;max-height:440px;overflow-y:auto;padding:4px}
.bubble{max-width:85%;padding:10px 14px;border-radius:12px;white-space:pre-line;overflow-wrap:anywhere;font-size:16px}
.bubble.me{align-self:flex-end;background:var(--primary);color:#fff}
.bubble.bot{align-self:flex-start;background:var(--g100)}

/* sign-in, as the appraisal portal */
.signin{max-width:448px;margin:24px auto 0}
.signin .head{text-align:center;margin-bottom:24px}
.signin .head .t{font-size:20px;line-height:28px;font-weight:600}
.otp{display:flex;gap:8px;justify-content:space-between}
.otp input{height:48px;text-align:center;font-size:20px;font-weight:600;padding:0}
.otp input:focus{padding:0}
.persona{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--border)}
.persona:last-child{border-bottom:0}
.persona .who2{min-width:0;flex:1 1 220px}
.avatar{width:32px;height:32px;border-radius:9999px;border:1px solid var(--border);background:var(--surface-2);display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:500;flex:none}

/* launchpads, as the appraisal feature index */
.launch{max-width:980px;margin:0 auto}
.launch .gtitle{font-size:16px;line-height:24px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--soft);margin:28px 0 12px}
.lcard{background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:16px;text-decoration:none;color:var(--primary);display:block;min-width:0}
.lcard:hover{border-color:var(--g300)}
.lcard .ibox{width:36px;height:36px;border:1px solid var(--border);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--primary);background:var(--surface)}
.lcard h3{margin:12px 0 4px}
.lcard p{font-size:14px;line-height:20px;color:var(--soft);margin:0 0 6px}
.lcard .steps{margin:8px 0 0;padding-left:20px;font-size:14px;line-height:20px}
.lcard .steps a{color:var(--primary)}
.wfid{font-family:ui-monospace,Menlo,monospace;font-size:12px;color:var(--soft)}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
code{font-size:13px;background:var(--g100);padding:0 4px;border-radius:4px;overflow-wrap:anywhere}

/* narrow phones: long button labels and selects wrap instead of pushing the page sideways */
select.auto{max-width:100%}
@media (max-width:480px){
  .btn{white-space:normal;height:auto;min-height:44px;text-align:center}
  .btn.small{min-height:36px}
  .tools{width:100%}
}

/* pass 10 fixes, 10 Oct 2026: header on one line, money never splits, IDs never break */
.tools select,.tools input[type=date]{width:auto;max-width:100%}
.figs{grid-template-columns:repeat(auto-fit,minmax(118px,1fr))}
.fig b{font-size:18px;white-space:nowrap;overflow-wrap:normal}
td.id,th.id{white-space:nowrap}
td.nowrap{white-space:nowrap}

/* the entitlement, as the card's headline figure rather than a tile */
.amount{font-size:24px;line-height:32px;font-weight:600;margin:4px 0 2px;font-variant-numeric:tabular-nums}
.amount span{font-size:16px;font-weight:400;color:var(--soft)}

/* an ineligible benefit: shown, but greyed out */
.card.off>:not(.spread){opacity:.45;filter:grayscale(1)}

/* error pop-up */
.scrim{position:fixed;inset:0;background:rgba(18,18,18,.4);display:flex;align-items:center;justify-content:center;padding:16px;z-index:50}
.modal{background:var(--surface-2);border-radius:8px;border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.2);padding:20px;width:100%;max-width:440px}
.modal ul{margin:14px 0 18px;padding-left:20px}
.modal li{margin-bottom:6px}

/* empty message inside a flush card lines up with the card title */
.card.flush>.empty{padding:0 20px 20px;margin:0}

/* ---------- phones ---------- */
.menubtn{display:none;margin-left:auto}
.menu{display:contents}
@media (max-width:760px){
  .top{flex-wrap:wrap;gap:8px}
  .menubtn{display:inline-flex}
  .menu{display:none;width:100%;flex-direction:column;gap:12px;padding:8px 0 4px}
  .top.open .menu{display:flex}
  .menu .nav{flex-direction:column;gap:2px}
  .menu .nav a{padding:10px 12px}
  .menu .tools{flex-direction:column;align-items:stretch}
  .menu .tools .btn{width:100%;justify-content:flex-start}
  .menu .tools select{width:100%}
  .menu .tools .iconbtn{align-self:flex-start}
  .pagehead>.row{width:100%}
  .pagehead>.row .btn{flex:1 1 auto}
}
@media (max-width:600px){
  table thead{display:none}
  table,tbody,tr,td{display:block;width:100%}
  tbody tr{border-bottom:1px solid var(--border);padding:8px 0}
  tbody tr:last-child{border-bottom:0}
  td{border:0;padding:4px 16px;display:flex;justify-content:space-between;gap:12px;text-align:right}
  td::before{content:attr(data-label);color:var(--soft);font-size:14px;text-align:left;flex:none}
  td.num,td.id,td.nowrap{white-space:normal;text-align:right}
  .card:not(.flush) td{padding:4px 0}
  .tablewrap{overflow-x:visible}
}
@media (max-width:600px){
  td{overflow-wrap:anywhere;word-break:break-word;min-width:0}
  td::before{max-width:45%}
}
@media (max-width:600px){
  .figs{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .fig{padding:8px 10px}
  .fig b{font-size:15px;line-height:22px}
  .fig span{font-size:13px}
}
@media (max-width:330px){ .figs{grid-template-columns:repeat(2,minmax(0,1fr))} }
