/* OT Ledger — PSEG brand (internal-comms look): white/ice grounds, navy bars, orange accents.
   Outfit for everything (600 on web); DM Serif Display Italic only for short orange accent phrases.
   Orange text on white uses orange-ink (#C63D1B) for contrast; never orange text on ice.
   The PSEG logo is deliberately not used: this is a team tool, not an official PSEG system. */
:root {
  --navy: #142C41; --navy-deep: #232640; --orange: #F0512C; --orange-ink: #C63D1B; --ice: #E4EBF7; --white: #FFFFFF;
  --muted: #5A6A7A; --muted-dark: #9FB0C4; --line: #D3DCEA; --panel: #F6F8FC; --field: #B9C6D8;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --script: "DM Serif Display", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--navy); font: 400 16px/1.5 var(--sans); overflow-x: hidden; min-height: 100vh;
  font-variant-numeric: tabular-nums; }
.paper { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(900px 500px at 100% 0%, rgba(228, 235, 247, .9), transparent 70%),
              radial-gradient(700px 420px at 0% 100%, rgba(243, 154, 120, .10), transparent 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
.script { font-family: var(--script); font-style: italic; font-weight: 400; color: var(--orange-ink); letter-spacing: 0; text-transform: none; }

/* navy top bar with faint power-line curves */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) 18px 12px; color: var(--white); overflow: hidden;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-deep) 100%); border-bottom: 3px solid var(--orange); }
.top::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0 18 Q100 40 200 22 T400 20' fill='none' stroke='%23E4EBF7' stroke-width='1'/%3E%3Cpath d='M0 34 Q120 56 220 36 T400 38' fill='none' stroke='%23E4EBF7' stroke-width='1'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
.brand { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 8px; font: 700 21px/1 var(--sans); letter-spacing: -.01em; }
.brand .script { color: var(--orange); font-size: 22px; }
.who { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; font: 600 14px var(--sans); min-width: 0; }
.who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; color: var(--ice); }
.link { white-space: nowrap; background: none; border: 0; padding: 6px 2px; color: var(--white); font: 600 14px var(--sans);
  text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; text-decoration-thickness: 2px; }

.frame { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 22px 16px 32px; }
.loading { color: var(--muted); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--orange-ink); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--orange); flex: none; }
h1 { font: 700 clamp(30px, 8vw, 46px)/1.08 var(--sans); letter-spacing: -.02em; margin: 0 0 14px; }
h1 .script { display: block; margin-top: 2px; }
h2 { font: 700 22px/1.15 var(--sans); letter-spacing: -.01em; margin: 0; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.fine { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.err { color: var(--orange-ink); font-weight: 600; margin: 4px 0 0; font-size: 14px; }
.err:empty { display: none; }

/* brand card: white, hairline outline, orange bar on the left edge */
.card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 20px 22px 24px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(20, 44, 65, .06), 0 10px 30px -18px rgba(20, 44, 65, .35); }
.card::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 5px; background: var(--orange); border-radius: var(--r) 0 0 var(--r); }

label { display: flex; flex-direction: column; gap: 6px; font: 600 14px var(--sans); color: var(--navy); }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--field); border-radius: 8px;
  background: var(--white); font: 400 17px var(--sans); color: var(--navy); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(240, 81, 44, .25); outline: none; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
.row { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 10px; }
.row.wrap { flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span2 { grid-column: 1 / -1; }

.stamp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px;
  background: var(--orange); color: var(--white); border: 0; border-radius: 8px; text-decoration: none;
  font: 700 17px/1 var(--sans); letter-spacing: .01em; transition: transform .2s var(--ease), background .2s; }
.stamp-btn::after { content: ""; width: 12px; height: 12px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 10L10 2M4 2h6v6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.stamp-btn:hover { background: #E04420; } .stamp-btn:active { transform: translateY(1px) scale(.99); }
.stamp-btn[disabled] { opacity: .6; }
.ghost { min-height: 50px; padding: 0 18px; background: transparent; border: 1.5px solid var(--navy); border-radius: 8px; font: 600 16px var(--sans); }

/* sign in */
.signin { max-width: 520px; margin: 3vh auto 0; }
.names { display: grid; gap: 10px; }
.name-btn { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 0 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; text-align: left; font: 700 22px/1 var(--sans);
  transition: transform .25s var(--ease), border-color .2s, background .2s; }
.name-btn small { font: 700 11px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.name-btn:hover, .name-btn:focus-visible { background: var(--white); border-color: var(--orange); transform: translateX(4px); }
.pin-form { margin-top: 6px; display: grid; gap: 10px; }
.pin-form input { font: 700 28px var(--sans); letter-spacing: .45em; text-align: center; }

/* totals strip: navy stat cards like the benefits commercial */
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.tot { position: relative; background: linear-gradient(135deg, var(--navy), var(--navy-deep)); color: var(--ice); border-radius: var(--r);
  padding: 14px 12px 12px 16px; overflow: hidden; }
.tot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.tot b { display: block; font: 700 clamp(26px, 8vw, 40px)/1 var(--sans); color: var(--white); letter-spacing: -.02em; }
.tot b em { font-style: normal; color: var(--orange); font-size: .45em; margin-left: 3px; }
.tot span { font: 700 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); }

/* entry form */
.punch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.dayname { font: 600 13px var(--sans); color: var(--muted); }
.hours { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hours .lbl { font: 600 14px var(--sans); width: 100%; }
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--field); border-radius: 8px; overflow: hidden; background: var(--white); }
.stepper button { width: 56px; min-height: 56px; border: 0; background: var(--ice); color: var(--navy); font: 600 28px/1 var(--sans); transition: background .15s; }
.stepper button:active { background: var(--navy); color: var(--white); }
.stepper output { min-width: 108px; display: grid; place-items: center; font: 700 30px/1 var(--sans); color: var(--navy);
  border-left: 1.5px solid var(--field); border-right: 1.5px solid var(--field); }
.hint { font-size: 13px; color: var(--muted); flex: 1 1 200px; }
.count { align-self: flex-end; font: 500 12px var(--sans); color: var(--muted); }
.stampmark { font: italic 400 28px/1 var(--script); color: var(--orange-ink); opacity: 0; transform: translateY(14px); pointer-events: none; white-space: nowrap; }
.stampmark.hit { animation: rise 2.4s var(--ease) forwards; }
@keyframes rise { 0% { opacity: 0; transform: translateY(14px); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
.punch.editing::before { background: var(--navy); }

/* worker history */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.week { margin-bottom: 18px; }
.week-head { display: flex; justify-content: space-between; gap: 8px; font: 700 11px var(--sans); letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--navy); padding-bottom: 7px; margin-bottom: 8px; }
.week-head b { color: var(--orange-ink); }
.entry { display: grid; grid-template-columns: 74px 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 12px 6px;
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 8px; margin-bottom: 8px; }
.entry .when { font: 700 14px/1.25 var(--sans); }
.entry .when span { display: block; color: var(--orange-ink); font-size: 11px; letter-spacing: .14em; }
.entry .what { overflow-wrap: anywhere; }
.entry .meta { grid-column: 2; font: 500 12px var(--sans); color: var(--muted); }
.entry .hrs { font: 700 22px/1 var(--sans); color: var(--navy); text-align: right; }
.entry .acts { grid-column: 2 / -1; display: flex; gap: 16px; justify-content: flex-end; }
.entry .acts button { background: none; border: 0; padding: 8px 2px; min-height: 40px; font: 600 13px var(--sans); color: var(--navy);
  text-decoration: underline; text-underline-offset: 3px; }
.entry .acts .del { color: var(--orange-ink); }
.empty { padding: 26px 16px; text-align: center; border: 1.5px dashed var(--field); border-radius: var(--r); color: var(--muted); background: var(--panel); }

/* supervisor */
.sup-head { margin: 4px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 42px; padding: 0 16px; border: 1.5px solid var(--field); border-radius: 999px; background: var(--white); font: 600 14px var(--sans); color: var(--navy); }
.chips button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sel { flex: 1 1 200px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 22px; }
.sum { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px 20px; overflow: hidden; }
.sum::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--orange); }
.sum h3 { margin: 0 0 8px; font: 700 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--orange-ink); }
.sum .big { font: 700 38px/1 var(--sans); letter-spacing: -.02em; color: var(--navy); }
.sum .big small { font-size: 15px; color: var(--muted); margin-left: 4px; font-weight: 600; letter-spacing: 0; }
.sum .sub { font: 500 13px var(--sans); color: var(--muted); margin-top: 6px; }
.sum.all { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); border-color: var(--navy); color: var(--ice); }
.sum.all h3 { color: var(--orange); } .sum.all .big { color: var(--white); } .sum.all .big small, .sum.all .sub { color: var(--muted-dark); }
.day { margin-bottom: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 16px;
  background: linear-gradient(120deg, var(--navy), var(--navy-deep)); color: var(--white); border-bottom: 3px solid var(--orange); }
.day-head h3 { margin: 0; font: 700 18px/1 var(--sans); }
.day-head h3 span { font: 500 14px var(--sans); margin-left: 8px; color: var(--muted-dark); }
.day-head b { font: 700 16px var(--sans); color: var(--orange); }
.line { display: grid; grid-template-columns: minmax(80px, 150px) 1fr 70px; gap: 6px 14px; padding: 13px 16px; border-top: 1px solid var(--line); }
.line:first-of-type { border-top: 0; }
.line .nm { font: 700 17px/1.15 var(--sans); }
.line .nm small { display: block; font: 500 12.5px var(--sans); color: var(--muted); margin-top: 3px; }
.line .ds { overflow-wrap: anywhere; }
.line .ds small { display: block; font: 500 12px var(--sans); color: var(--muted); margin-top: 4px; }
.line .hr { font: 700 20px/1 var(--sans); text-align: right; color: var(--navy); }
.tag { display: inline-block; font: 700 10px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--orange-ink);
  background: #FDECE7; border-radius: 4px; padding: 2px 6px; margin-left: 6px; }

/* setup */
.people-list { display: grid; gap: 10px; margin-bottom: 22px; }
.person { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--panel); display: grid; gap: 10px; }
.person.off { opacity: .55; }
.person .p-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.person .p-top b { font: 700 20px/1 var(--sans); }
.person .p-top span { font: 500 13px var(--sans); color: var(--muted); }
.person .p-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.person .p-acts button { min-height: 40px; padding: 0 12px; border: 1.5px solid var(--field); border-radius: 8px; background: var(--white); font: 600 13px var(--sans); }
.add { border-top: 1.5px dashed var(--field); padding-top: 18px; }

.foot { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 0 16px max(28px, env(safe-area-inset-bottom));
  font-size: 12.5px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 8px; font: 600 14px var(--sans);
  border-left: 4px solid var(--orange); box-shadow: 0 12px 30px -10px rgba(20, 44, 65, .5); max-width: calc(100vw - 32px); }

@media (max-width: 560px) {
  .brand { font-size: 19px; white-space: nowrap; } .brand .script { display: none; }
  .who { gap: 10px; } .who span { max-width: 24vw; }
  .line { grid-template-columns: 1fr 64px; }
  .line .ds { grid-column: 1 / -1; grid-row: 2; }
  .entry { grid-template-columns: 62px 1fr auto; padding: 10px 10px 4px; }
  .card { padding: 20px 14px 20px 20px; }
  .stepper output { min-width: 90px; }
  .row.wrap .stamp-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print { .top, .filters, .toast, .paper, .foot { display: none !important; } }
