/* Hoober Timecard: Hoober Dark app shell + a light, printable co-branded timecard page */
:root{
  --bg:#0b0b0b; --surface:#161616; --surface2:#1c1c1c; --field:#1f1f1f; --viewer:#080808;
  --line:rgba(255,255,255,.08); --line2:rgba(255,255,255,.20);
  --ink:#d4d4cf; --muted:rgba(212,212,207,.6); --dim:rgba(212,212,207,.45);
  --green:#234430; --green-h:#2b5239; --gold:#d4af37;
  --shadow:0 10px 30px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{margin:0}
body{min-height:100vh;background:var(--bg);color:var(--ink);font-family:'Instrument Sans','Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
[hidden]{display:none!important}

/* top bar (same as the other apps) */
.topbar{display:flex;align-items:center;padding:20px 34px 20px 28px}
.brand{display:flex;align-items:center;gap:16px;text-decoration:none;color:inherit}
.brand-logo{display:block;height:34px;width:auto}
.brand-divider{display:block;width:1px;height:30px;background:rgba(212,175,55,.45)}
.brand-name{font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:28px;letter-spacing:-.01em;line-height:1}

.tc-wrap{display:grid;grid-template-columns:minmax(360px,490px) minmax(0,1fr);gap:24px;padding:4px 34px 40px 28px;align-items:start}

/* form */
.tc-form{display:flex;flex-direction:column;gap:16px}
.box{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:18px 18px 6px;box-shadow:var(--shadow)}
.box h2{margin:0 0 14px;font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:21px}
.box-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.hint{margin:-6px 0 14px;font-size:13px;color:var(--muted)}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;min-width:0}
.field>span{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.field input,.field select,.field textarea,.day input{width:100%;min-width:0;background:var(--field);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:15px;outline:none;color-scheme:dark}
.field textarea{resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus,.day input:focus{border-color:rgba(212,175,55,.6)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.link-btn{background:none;border:0;padding:0;color:var(--gold);font-size:13px;font-weight:600;cursor:pointer}
.link-btn:hover{text-decoration:underline}

.days{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.week-label{margin:6px 0 -2px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gold)}
.day{border:1px solid var(--line);border-radius:14px;padding:10px 12px 12px;background:var(--surface2)}
.day.off{opacity:.8}
.day-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.day-top b{font-size:14.5px;font-weight:600}
.day-top em{font-style:normal;font-size:13px;color:var(--muted)}
.day-top em.has{color:var(--gold);font-weight:600}
.day-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 54px;gap:6px}
.day-grid label{display:flex;flex-direction:column;gap:4px;min-width:0}
.day-grid label span{font-size:10.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--dim);white-space:nowrap}
.day input{padding:8px 4px;font-size:13.5px;border-radius:8px;text-align:center}
.day input[type=time]::-webkit-calendar-picker-indicator{display:none}
.day input[type=time]::-webkit-datetime-edit{padding:0}
.day input[type=number]{text-align:center}

.btn.small{height:36px;padding:0 16px;font-size:13.5px}
.box-head{margin-bottom:12px}
.box-head h2{margin:0}

/* usual hours (Auto fill setup) */
.usual{border:1px solid var(--line);border-radius:14px;background:var(--surface2);margin-bottom:12px}
.usual summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;cursor:pointer;list-style:none;font-size:14px;font-weight:600}
.usual summary::-webkit-details-marker{display:none}
.usual summary em{font-style:normal;font-weight:500;font-size:13px;color:var(--muted);text-align:right}
.usual summary::after{content:'';flex:none;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:-4px 2px 0 0;transition:transform .15s}
.usual[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.usual-body{padding:0 14px 4px}
.usual-body .day-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.usual-body input{width:100%;min-width:0;background:var(--field);border:1px solid var(--line);border-radius:8px;padding:8px 4px;font-size:13.5px;text-align:center;outline:none;color-scheme:dark}
.usual-body input[type=time]::-webkit-calendar-picker-indicator{display:none}
.usual-body input:focus{border-color:rgba(212,175,55,.6)}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.chip{min-width:44px;height:34px;padding:0 10px;border-radius:999px;border:1px solid var(--line2);background:transparent;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.chip.on{background:var(--green);border-color:rgba(212,175,55,.6);color:#f1efe6}

/* weeks (collapsible) */
.weeks{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.wkbox{border:1px solid var(--line);border-radius:14px;background:var(--surface2)}
.wkbox>summary{display:flex;align-items:center;gap:12px;padding:13px 14px;cursor:pointer;list-style:none}
.wkbox>summary::-webkit-details-marker{display:none}
.wkbox>summary b{font-size:14.5px;font-weight:600}
.wkbox>summary span{font-size:13px;color:var(--muted)}
.wkbox>summary em{margin-left:auto;font-style:normal;font-size:13.5px;font-weight:600;color:var(--gold)}
.wkbox>summary em.zero{color:var(--dim);font-weight:500}
.wkbox>summary::after{content:'';flex:none;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:-4px 2px 0 0;transition:transform .15s}
.wkbox[open]>summary::after{transform:rotate(-135deg);margin-top:4px}
.wk-days{display:flex;flex-direction:column;gap:8px;padding:0 10px 10px}
.wkbox .day{background:var(--surface)}
.day-top .clr{background:none;border:0;padding:0 0 0 10px;font-size:12px;color:var(--dim);cursor:pointer}
.day-top .clr:hover{color:var(--gold)}

/* signature */
.sig-saved{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.sig-img{flex:none;width:200px;height:70px;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;padding:6px 10px}
.sig-img img{max-width:100%;max-height:100%}
.sig-links{display:flex;gap:14px}
.check{display:flex;align-items:center;gap:10px;margin-bottom:16px;font-size:14px;cursor:pointer}
.check input{width:18px;height:18px;accent-color:#3f7a55}
.modal-back{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.7);display:flex;align-items:center;justify-content:center;padding:16px}
.modal{width:min(560px,100%);background:var(--surface);border:1px solid var(--line2);border-radius:20px;padding:22px;box-shadow:var(--shadow)}
.modal h2{margin:0 0 14px;font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:22px}
.seg{display:inline-flex;padding:4px;border-radius:999px;background:var(--field);border:1px solid var(--line);margin-bottom:14px}
.seg button{border:0;background:none;padding:8px 18px;border-radius:999px;font-size:13.5px;font-weight:600;color:var(--muted);cursor:pointer}
.seg button.on{background:var(--green);color:#f1efe6}
#sigPad{display:block;width:100%;aspect-ratio:10/3;background:#fff;border-radius:12px;touch-action:none;cursor:crosshair}
.sig-draw .hint{margin:10px 0 0}
.sig-typed{height:110px;border-radius:12px;background:#fff;color:#0b1b33;display:flex;align-items:center;justify-content:center;font-family:'Dancing Script',cursive;font-weight:600;font-size:46px;overflow:hidden;white-space:nowrap;padding:0 16px;margin-bottom:6px}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}

/* preview */
.tc-preview{position:sticky;top:16px;display:flex;flex-direction:column;gap:14px;min-width:0}
.pv-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pv-total{font-size:14px;color:var(--muted)}
.pv-total b{color:var(--ink);font-size:20px;font-weight:600;margin-right:4px}
.pv-actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{height:44px;padding:0 20px;border-radius:999px;border:1px solid var(--line2);background:var(--surface);font-weight:600;font-size:14.5px;cursor:pointer}
.btn.ghost:hover{border-color:rgba(212,175,55,.55)}
.btn.gold{background:var(--green);border-color:rgba(212,175,55,.75);color:#f1efe6}
.btn.gold:hover{background:var(--green-h)}
.btn:disabled{opacity:.5;cursor:wait}
.pv-stage{background:var(--viewer);border:1px solid var(--line);border-radius:18px;padding:22px;overflow:hidden}
.pv-scale{transform-origin:top left}
.pv-scale .tc-page{box-shadow:0 18px 50px rgba(0,0,0,.55)}

.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:90;background:#1c1c1c;border:1px solid rgba(212,175,55,.45);border-radius:999px;padding:12px 20px;font-size:14px;font-weight:500;box-shadow:var(--shadow);transition:.2s}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (max-width:1000px){
  .tc-wrap{grid-template-columns:1fr}
  .tc-preview{position:static}
}
@media (max-width:600px){
  .topbar{padding:16px}
  .brand{gap:12px}
  .brand-logo{height:28px}
  .brand-name{font-size:23px}
  .tc-wrap{padding:0 16px 32px}
  .pv-stage{padding:12px}
  .pv-actions{width:100%}
  .pv-actions .btn{flex:1;padding:0 10px}
  .day-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .day-grid label.pto{grid-column:span 2}
}

/* ── The timecard page: US Letter, 816 × 1056 px (96 per inch) ── */
.tc-page{width:816px;height:1056px;background:#fff;color:#0b1b33;font-family:Inter,Arial,sans-serif;padding:44px 48px 34px;display:flex;flex-direction:column;position:relative}
.tc-head{display:flex;align-items:center;justify-content:space-between;gap:20px}
.tc-cobrand{display:flex;align-items:center;gap:13px}
.tc-cobrand .hl{height:40px;width:auto;display:block}
.tc-cobrand .dv{width:1px;height:36px;background:#9EA29B}
.tc-cobrand .bm{height:34px;width:auto;display:block}
.tc-cobrand .bt{display:flex;flex-direction:column;gap:2px;line-height:1.08;white-space:nowrap}
.tc-cobrand .bt small{font-size:7px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;color:#4f6383}
.tc-cobrand .bt b{font-size:11.6px;font-weight:700}
.tc-cobrand .bt span{font-size:8.4px;color:#4f6383}
.tc-title{text-align:right}
.tc-title h1{margin:0;font-family:'Playfair Display',Georgia,serif;font-weight:600;font-size:34px;letter-spacing:-.01em;line-height:1;color:#234430}
.tc-title p{margin:6px 0 0;font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:#6b7a90}
.tc-rule{height:3px;margin:20px 0 18px;background:linear-gradient(90deg,#234430 0 70%,#D4AF37 70% 100%);border-radius:2px}

.tc-info{display:grid;grid-template-columns:1.5fr 1fr .8fr 1.5fr;gap:0;border:1px solid #d5d9df;border-radius:8px;overflow:hidden;margin-bottom:16px}
.tc-info div{padding:9px 12px 10px;border-right:1px solid #d5d9df;min-width:0}
.tc-info div:last-child{border-right:0}
.tc-info span{display:block;font-size:8.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:#6b7a90;margin-bottom:4px}
.tc-info b{display:block;font-size:13px;font-weight:600;min-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.tc-table{width:100%;border-collapse:collapse;font-size:11.5px}
.tc-table th{background:#234430;color:#fff;font-size:8.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:600;padding:8px 6px;text-align:center}
.tc-table th:first-child{border-radius:6px 0 0 0;text-align:left;padding-left:12px}
.tc-table th:last-child{border-radius:0 6px 0 0}
.tc-table td{border-bottom:1px solid #e2e5ea;padding:0 6px;text-align:center;height:var(--rowh,30px);white-space:nowrap}
.tc-table td:first-child{text-align:left;padding-left:12px;font-weight:600}
.tc-table td.dw{color:#6b7a90;font-weight:500}
.tc-table td.tot{font-weight:700}
.tc-table tr.wk td{background:#f3f1e8;border-bottom:1px solid #d9d2b4;font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:#5d4f1c;height:var(--wkh,22px)}
.tc-table tr.wk td.tot{font-size:11.5px;letter-spacing:0;color:#0b1b33}
.tc-table tr.blank td{color:transparent}

.tc-bottom{display:grid;grid-template-columns:1fr 250px;gap:18px;margin-top:16px}
.tc-notes{border:1px solid #d5d9df;border-radius:8px;padding:9px 12px;min-height:74px}
.tc-notes span,.tc-sum span{display:block;font-size:8.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:#6b7a90;margin-bottom:5px}
.tc-notes p{margin:0;font-size:11.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.tc-sum{border:1px solid #d5d9df;border-radius:8px;overflow:hidden}
.tc-sum div{display:flex;justify-content:space-between;align-items:center;padding:7px 12px;border-bottom:1px solid #e2e5ea;font-size:12px}
.tc-sum div span{margin:0}
.tc-sum div b{font-size:13px}
.tc-sum div.grand{background:#234430;color:#fff;border-bottom:0;padding:10px 12px}
.tc-sum div.grand span{color:#e9e4cf}
.tc-sum div.grand b{font-size:17px;color:#fff}

.tc-sign{display:grid;grid-template-columns:1fr 130px;gap:14px 22px;margin-top:auto;padding-top:20px}
.tc-sign div{display:flex;flex-direction:column;height:50px}
.tc-sign div i{display:flex;align-items:flex-end;flex:1;border-bottom:1px solid #0b1b33;font-style:normal;font-size:13px;font-weight:600;color:#0b1b33;padding:0 0 4px 6px;min-height:0}
.tc-sign div i img{display:block;max-height:46px;max-width:300px;margin-bottom:-6px}
.tc-sign div span{margin-top:5px;font-size:8.5px;letter-spacing:.12em;text-transform:uppercase;font-weight:600;color:#6b7a90}
.tc-foot{margin-top:18px;padding-top:10px;border-top:1px solid #e2e5ea;display:flex;justify-content:space-between;font-size:8.5px;color:#6b7a90}

/* dropdowns: our own arrow, set in from the edge */
.field select{-webkit-appearance:none;appearance:none;padding-right:44px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4d4cf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;background-size:16px}

/* You: the signed-in person (demo: picked under "Not you?") */
.me-card{display:flex;align-items:center;gap:14px;padding:12px 14px;margin-bottom:12px;border-radius:14px;background:var(--surface2, #1c1c1c);border:1px solid var(--line)}
.me-photo{width:48px;height:48px;flex:none;border-radius:50%;background:#234430 center/cover no-repeat;border:2px solid rgba(212,175,55,.5);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px}
.me-tx{min-width:0;display:flex;flex-direction:column;gap:2px}
.me-tx b{font-size:16px;font-weight:600}
.me-tx small{font-size:13px;color:var(--muted)}
.me-empty{font-size:14px;color:var(--muted);line-height:1.5}
.me-empty b{color:var(--ink)}
.demo-who{margin:0 0 14px}
.demo-who summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--gold);list-style:none;display:inline-flex;gap:6px}
.demo-who summary::-webkit-details-marker{display:none}
.demo-who summary em{font-style:normal;font-weight:500;color:var(--muted)}
.demo-who[open] summary{margin-bottom:12px}
.demo-who .hint{margin:-6px 0 4px;font-size:12.5px;color:var(--muted);line-height:1.45}
/* Sent to payroll / locked (Admin → Settings → Timecard) */
.tc-locked{margin:0 0 10px;padding:10px 14px;border-radius:12px;border:1px solid rgba(212,175,55,.45);background:rgba(212,175,55,.08);font-size:13.5px;line-height:1.5}
.tc-form.locked .box{pointer-events:none;opacity:.55}
.tc-form.locked .box:nth-child(2){pointer-events:auto;opacity:1}
