/* Meridian OnPay — approved time-card design tokens.
   Locked layout: navy #1E3A8A header, blue CT / amber MA service-state tabs,
   quarter-hour steppers, summary band. Classes mirror the approved render
   (.mstp/.mstpv/.mstpb/.mcell/.mhead/.mtab/.mtile/.mtl/.mtv) and the help
   drawer (.hwrap/.hpanel/.hsec/.hh/.hp/.hli/.hk). */

:root{
  --navy:#1E3A8A; --navy-2:#1E40AF; --amber:#F59E0B; --amber-ink:#92400E;
  --page:#EAF1F4; --ink:#1E293B; --muted:#64748B; --faint:#94A3B8;
  --line:#CBD5E1; --line-2:#EEF2F6; --tile:#EAF1F4; --employer-tile:#EEF2FB;
  --blue-bg:#DBEAFE; --amber-bg:#FEF3C7; --ok:#0F6E56; --err:#B42318;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--page); color:var(--ink); line-height:1.5;
  -webkit-font-smoothing:antialiased;
}

/* ---- top bar (minimal; no role-tile dashboard) ---- */
.onpay-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 18px; background:#fff; border-bottom:1px solid var(--line);
}
.onpay-header-brand{display:flex; align-items:center; gap:9px; text-decoration:none; color:var(--navy); font-weight:600; font-size:15px}
.onpay-header-brand img{display:block}
.onpay-header-user{display:flex; align-items:center; gap:14px}
.onpay-header-name{font-size:13px; color:var(--muted)}
.onpay-inline-form{margin:0}
.onpay-linkbtn{background:none; border:none; color:var(--navy); font-size:13px; cursor:pointer; padding:0; font-weight:500}
.onpay-linkbtn:hover{text-decoration:underline}
.onpay-main{padding:0}
.onpay-footbar{text-align:center; color:var(--faint); font-size:11px; padding:18px 0 28px}

/* ---- card wrapper + period strip ---- */
.tc-wrap{max-width:880px; margin:0 auto; padding:18px}
.tc-strip{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap}
.tc-strip label{font-size:12px; color:var(--muted)}
.tc-strip select{
  font:inherit; font-size:13px; color:var(--ink); padding:6px 10px;
  border:1px solid var(--line); border-radius:8px; background:#fff;
}
.tc-card{background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden}

/* ---- header bar ---- */
.tc-head{background:var(--navy); padding:13px 18px; display:flex; align-items:center; gap:12px}
.tc-logo{width:40px; height:40px; border-radius:9px; background:#fff; display:flex; align-items:center; justify-content:center; flex:none}
.tc-titles{flex:1; min-width:0}
.tc-title{font-size:15px; font-weight:500; color:#fff}
.tc-sub{font-size:12px; color:#C7D2FE}
.tc-help{
  width:30px; height:30px; border-radius:50%; border:1px solid rgba(255,255,255,.5);
  background:rgba(255,255,255,.14); color:#fff; font-size:15px; font-weight:500;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.tc-help:hover{background:rgba(255,255,255,.24)}
.tc-pill{font-size:12px; font-weight:500; padding:4px 12px; border-radius:8px; white-space:nowrap}
.tc-pill--draft{background:var(--amber-bg); color:var(--amber-ink)}
.tc-pill--submitted{background:#DBEAFE; color:#1E40AF}
.tc-pill--approved{background:#DCFCE7; color:#166534}
.tc-pill--rejected{background:#FEE2E2; color:#991B1B}
.tc-pill--processed{background:#E2E8F0; color:#334155}

.tc-body{padding:16px 18px 14px}

/* ---- identity tiles ---- */
.tc-tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(132px,1fr)); gap:10px; margin-bottom:16px}
.mtile{background:var(--tile); border-radius:8px; padding:8px 12px}
.mtile--employer{background:var(--employer-tile)}
.mtl{font-size:11px; color:var(--muted)}
.mtv{font-size:13px; font-weight:500; color:var(--ink)}
.mtv--navy{color:var(--navy)}

/* ---- service-state caption + tabs ---- */
.tc-caption{font-size:11px; color:var(--muted); margin-bottom:5px}
.tc-caption .dim{color:var(--faint)}
.tc-tabs{display:flex; align-items:flex-end; margin-bottom:-1px; flex-wrap:wrap}
.mtab{
  padding:9px 16px; font-size:13px; font-weight:500; border:1px solid var(--line);
  border-bottom:none; border-radius:8px 8px 0 0; cursor:pointer; margin-right:6px;
  background:transparent; color:var(--muted);
}
.tc-addstate{font-size:12px; color:var(--faint); padding:9px 12px}

/* ---- table ---- */
.tc-table{width:100%; border-collapse:collapse; table-layout:fixed}
.mhead{padding:9px 7px; font-size:12px; color:var(--muted); font-weight:500; border-bottom:1.5px solid var(--line); vertical-align:bottom; line-height:1.25}
.mhead--left{text-align:left}
.mcell{padding:6px 7px; text-align:center; border-bottom:1px solid var(--line-2)}
.mcell--date{text-align:left; color:var(--muted)}
.mcell--day{font-weight:500; color:var(--ink)}
.mcell--foot{font-weight:500; color:var(--ink); border-bottom:none}

/* ---- stepper ---- */
.mstp{display:inline-flex; align-items:center; gap:4px; border:1px solid var(--line); border-radius:8px; padding:1px 4px 1px 8px; background:#fff; min-width:56px; justify-content:space-between}
.mstp.is-readonly{background:#F8FAFC}
.mstpv{font-size:13px; color:var(--ink); font-weight:500; min-width:24px; text-align:right}
.mstpb{display:flex; flex-direction:column; line-height:0}
.mstpb button{border:none; background:transparent; padding:0 1px; margin:0; cursor:pointer; color:var(--muted); height:12px; display:flex; align-items:center}
.mstpb button:hover{color:#2563EB}
.mstpb button:disabled{color:#CBD5E1; cursor:default}

.tc-unit{font-size:11px; color:var(--faint); margin-top:7px}

/* ---- summary band ---- */
.tc-summary{margin-top:18px; border-top:1px solid var(--line-2); padding-top:14px}
.tc-rates{display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; gap:10px; flex-wrap:wrap}
.tc-rates-left{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.tc-rates-label{font-size:12px; color:var(--muted)}
.ratepill{font-size:12px; font-weight:500; padding:3px 10px; border-radius:20px}
.ratepill--clinical{background:var(--tile); color:var(--navy)}
.ratepill--admin{background:var(--amber-bg); color:var(--amber-ink)}
.tc-setby{font-size:11px; color:var(--muted)}
.tc-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:10px}
.tc-stat{font-size:20px; font-weight:500; color:var(--ink)}
.tc-stat--gross{color:var(--navy)}
.tc-stat--net{color:var(--muted)}
.tc-breakdown{margin-top:12px; padding:10px 12px; background:#F8FAFC; border:1px solid var(--line-2); border-radius:8px; font-size:12px; color:#475569}
.tc-breakdown b{color:var(--ink); font-weight:500}
.tc-breakdown .grs{color:var(--navy); font-weight:500}
.tc-onepay{font-size:11px; color:var(--muted); margin-top:8px}
.tc-onepay b{font-weight:500; color:var(--navy)}

/* ---- actions ---- */
.tc-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:14px; align-items:center; flex-wrap:wrap}
.tc-btn{border:none; border-radius:8px; padding:9px 16px; font-size:13px; font-weight:500; cursor:pointer; font-family:inherit}
.tc-btn--primary{background:var(--navy); color:#fff}
.tc-btn--primary:hover{background:#172f6f}
.tc-btn--ghost{background:#fff; color:var(--navy); border:1px solid var(--line)}
.tc-btn--ghost:hover{background:#F8FAFC}
.tc-btn:disabled{background:#E2E8F0; color:#94A3B8; cursor:default}
.tc-savednote{font-size:12px; color:var(--ok); margin-right:auto}
.tc-windownote{font-size:11px; color:var(--muted); margin-right:auto; max-width:60%}
.tc-windownote.is-late{color:var(--amber-ink)}

/* ---- inline alerts ---- */
.tc-alert{border-radius:8px; padding:9px 12px; font-size:13px; margin:0 0 12px}
.tc-alert--ok{background:#ECFDF5; color:#065F46; border:1px solid #A7F3D0}
.tc-alert--warn{background:#FFFBEB; color:#92400E; border:1px solid #FDE68A}
.tc-alert--error{background:#FEF2F2; color:#991B1B; border:1px solid #FECACA}
.tc-alert ul{margin:6px 0 0; padding-left:18px}
.tc-empty{color:var(--muted); font-size:14px; padding:24px 0}

/* ---- signature modal ---- */
.sig-back{position:fixed; inset:0; background:rgba(15,23,30,.4); display:none; align-items:center; justify-content:center; z-index:40}
.sig-back.is-open{display:flex}
.sig-card{background:#fff; border-radius:12px; width:min(420px,92vw); padding:18px; box-shadow:0 12px 40px rgba(0,0,0,.18)}
.sig-card h3{margin:0 0 4px; font-size:15px; color:var(--ink)}
.sig-card p{margin:0 0 12px; font-size:13px; color:var(--muted)}
.sig-card label{display:block; font-size:12px; color:var(--muted); margin-bottom:5px}
.sig-card input[type=text]{width:100%; font:inherit; font-size:14px; padding:9px 11px; border:1px solid var(--line); border-radius:8px}
.sig-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:14px}

/* ---- help drawer (approved) ---- */
.hwrap{position:fixed; inset:0; z-index:50; pointer-events:none}
.hback{position:absolute; inset:0; background:rgba(15,23,30,.40); opacity:0; transition:opacity .28s; pointer-events:none}
.hpanel{position:absolute; top:0; right:0; height:100%; width:342px; max-width:88vw; background:#fff; border-left:1px solid var(--line); transform:translateX(112%); transition:transform .28s ease; display:flex; flex-direction:column; pointer-events:auto}
.hwrap.is-open{pointer-events:auto}
.hwrap.is-open .hback{opacity:1; pointer-events:auto}
.hwrap.is-open .hpanel{transform:translateX(0)}
.hhead{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--tile)}
.hhead-l{display:flex; align-items:center; gap:9px}
.hbadge{width:26px; height:26px; border-radius:50%; background:var(--navy); color:#fff; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:500}
.hhead-t{font-size:15px; font-weight:500; color:var(--ink)}
.hclose{width:28px; height:28px; border-radius:8px; border:none; background:transparent; color:var(--muted); cursor:pointer; display:flex; align-items:center; justify-content:center}
.hclose:hover{background:var(--tile)}
.hbody{flex:1; overflow:auto}
.hsec{padding:13px 16px; border-bottom:1px solid #F1F5F8}
.hsec:last-child{border-bottom:none}
.hh{display:flex; align-items:center; gap:7px; font-size:13px; font-weight:500; color:#0A5A93; margin:0 0 5px}
.hp{font-size:13px; line-height:1.55; color:#3A4754; margin:0}
.hli{font-size:13px; line-height:1.5; color:#3A4754; margin:5px 0 0}
.hk{color:var(--ink); font-weight:500}
.hfoot{padding:11px 16px; border-top:1px solid var(--tile); background:#F7FAFB}
.hfoot div{font-size:11px; color:var(--faint)}
.hsec a{color:#0070C0; font-weight:500}

/* ---- login / password / submitted (inherit the theme) ---- */
.auth-wrap{max-width:380px; margin:8vh auto 0; padding:0 18px}
.auth-card{background:#fff; border:1px solid var(--line); border-radius:12px; overflow:hidden}
.auth-head{background:var(--navy); padding:18px; display:flex; align-items:center; gap:11px}
.auth-logo{width:38px; height:38px; border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center}
.auth-head-t{color:#fff; font-weight:500; font-size:15px}
.auth-head-s{color:#C7D2FE; font-size:12px}
.auth-body{padding:18px}
.auth-body h1{font-size:16px; margin:0 0 14px; color:var(--ink)}
.field{display:block; margin-bottom:12px}
.field span{display:block; font-size:12px; color:var(--muted); margin-bottom:5px}
.field input{width:100%; font:inherit; font-size:14px; padding:9px 11px; border:1px solid var(--line); border-radius:8px}
.auth-err{background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; border-radius:8px; padding:9px 12px; font-size:13px; margin:0 0 12px}
.auth-ok{background:#ECFDF5; color:#065F46; border:1px solid #A7F3D0; border-radius:8px; padding:9px 12px; font-size:13px; margin:0 0 12px}
.auth-actions{margin-top:6px}
.done-wrap{max-width:560px; margin:6vh auto 0; padding:0 18px}
.done-card{background:#fff; border:1px solid var(--line); border-radius:12px; padding:22px; text-align:center}
.done-mark{width:52px; height:52px; border-radius:50%; background:#DCFCE7; color:#166534; display:flex; align-items:center; justify-content:center; margin:0 auto 12px; font-size:26px}
.done-card h1{font-size:18px; margin:0 0 6px; color:var(--ink)}
.done-card p{color:var(--muted); font-size:14px; margin:0 0 6px}
.done-actions{display:flex; gap:10px; justify-content:center; margin-top:16px; flex-wrap:wrap}
.done-link{display:inline-block; text-decoration:none}
a.tc-btn{display:inline-block; text-decoration:none; text-align:center}

@media (max-width:560px){
  .tc-wrap{padding:12px}
  .mtab{padding:8px 11px}
  .mhead,.mcell{padding:6px 4px; font-size:11px}
}
