/* App shell */
.shell{ display:grid; grid-template-columns: 220px 1fr; gap:0; background:var(--surface); border:1px solid var(--line); border-radius:16px; overflow:hidden; box-shadow:var(--shadow-md); min-height:calc(100vh - 40px); min-width:0; }
.sidebar{ background:var(--bg-alt); border-right:1px solid var(--line); padding:20px 14px; display:flex; flex-direction:column; gap:22px; }
.brand{ display:flex; align-items:center; gap:9px; padding:4px 8px 10px; text-decoration:none; color:inherit; }
.brand .mark{ width:26px; height:26px; border-radius:7px; background:var(--accent); display:flex; align-items:center; justify-content:center; color:var(--accent-ink); font-weight:800; font-size:12px; flex:none; }
.brand .name{ font-weight:800; font-size:14px; letter-spacing:-0.01em; line-height:1.25; }
.brand .name small{ display:block; font-weight:600; color:var(--ink-faint); font-size:8px; letter-spacing:.05em; text-transform:uppercase; }

.nav{ display:flex; flex-direction:column; gap:2px; }
.nav a{ display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; color:var(--ink-soft); text-decoration:none; font-size:13px; font-weight:600; }
.nav a svg{ width:17px; height:17px; flex:none; opacity:.85; }
.nav a.active{ background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }
.nav a.active svg{ opacity:1; color:var(--accent); }
.nav-sep{ height:1px; background:var(--line); margin:6px 4px; }

.sidebar-foot{ margin-top:auto; padding:10px 8px; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.role-pill{ font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-faint); border:1px solid var(--line-strong); border-radius:999px; padding:5px 10px; display:inline-block; }
.signout-link{ font-size:12.5px; font-weight:600; color:var(--ink-soft); text-decoration:none; padding:2px 0; }
.signout-link:hover{ color:var(--ink); }

/* An inline expandable form living INSIDE another .card (e.g. "Add Admin"
   inside the Administrators card) — deliberately not a second nested .card
   (stacking two adjacent rounded/bordered boxes reads as visually
   collided); instead a clear horizontal divider + generous top padding. */
.form-panel{ border-top:1px solid var(--line); margin-top:16px; padding-top:20px; }

.lang-toggle{ display:flex; gap:2px; background:var(--surface); border:1px solid var(--line); border-radius:8px; padding:3px; margin-bottom:10px; width:fit-content; }
.lang-toggle button{ border:none; background:transparent; padding:5px 10px; font-size:11px; font-weight:800; letter-spacing:.03em; color:var(--ink-faint); border-radius:5px; }
.lang-toggle button.active{ background:var(--accent); color:var(--accent-ink); }
.lang-toggle button:not(.active):hover{ color:var(--ink); }

.content{ padding:22px 26px 30px; min-width:0; }
.topbar{ display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; flex-wrap:wrap; position:relative; z-index:20; }
.topbar h1{ font-size:21px; }
.topbar .sub{ color:var(--ink-soft); font-size:13px; margin-top:3px; }

.clockstack{ display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.clockbox{ text-align:right; }
.clockbox .time{ font-size:20px; font-weight:700; }
.clockbox .tz{ font-size:11.5px; color:var(--ink-faint); margin-top:1px; }
.clockbox.primary .time{ font-size:30px; font-weight:800; color:var(--accent); letter-spacing:-0.01em; }
.clockbox.primary .tz{ font-size:12px; color:var(--ink); font-weight:700; }
.clockbox.secondary{ opacity:.82; }
.clockbox.secondary .time{ font-size:14px; font-weight:700; }
.clockbox.secondary .tz{ font-size:10.5px; }

.grid2{ display:grid; grid-template-columns: 1.35fr 1fr; gap:16px; align-items:start; min-width:0; }
.grid2 > *{ min-width:0; }
.stack{ display:flex; flex-direction:column; gap:16px; }
.card{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px 20px; box-shadow:var(--shadow-sm); }
.card.full{ margin-top:16px; }
.card-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:10px; flex-wrap:wrap; }
.card-head h3{ font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-faint); font-weight:700; }
.card-head .hint{ font-size:12px; color:var(--ink-faint); }

.pill{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:700; padding:5px 10px; border-radius:999px; white-space:nowrap; }
.pill .dot{ width:6px; height:6px; border-radius:50%; }
.pill.work{ background:var(--st-work-soft); color:var(--st-work); } .pill.work .dot{ background:var(--st-work); }
.pill.lunch{ background:var(--st-lunch-soft); color:var(--st-lunch); } .pill.lunch .dot{ background:var(--st-lunch); }
.pill.off{ background:var(--st-off-soft); color:var(--st-off); } .pill.off .dot{ background:var(--st-off); }
.pill.alert{ background:var(--st-alert-soft); color:var(--st-alert); } .pill.alert .dot{ background:var(--st-alert); }
.pill.pending{ background:var(--st-lunch-soft); color:var(--st-lunch); } .pill.pending .dot{ background:var(--st-lunch); }
.pill.approved{ background:var(--st-work-soft); color:var(--st-work); } .pill.approved .dot{ background:var(--st-work); }
.pill.rejected{ background:var(--st-alert-soft); color:var(--st-alert); } .pill.rejected .dot{ background:var(--st-alert); }

/* punch card */
.punch-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.timer{ font-size:44px; font-weight:800; letter-spacing:-0.02em; }
.timer-label{ color:var(--ink-faint); font-size:12px; margin-top:2px; }
.target-hint{ font-size:12px; color:var(--ink-faint); margin-bottom:16px; }
.target-hint b{ color:var(--ink-soft); }

.progress{ height:8px; border-radius:999px; background:var(--line); overflow:hidden; margin:4px 0 6px; }
.progress .fill{ height:100%; background:var(--accent); border-radius:999px; transition:width .3s ease; }
.progress .fill.over{ background:var(--st-lunch); }
.progress-labels{ display:flex; justify-content:space-between; font-size:10.5px; color:var(--ink-faint); margin-bottom:18px; }

.banner{ display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border-radius:10px; background:var(--st-lunch-soft); border:1px solid var(--st-lunch); margin-bottom:18px; }
.banner svg{ flex:none; color:var(--st-lunch); margin-top:2px; }
.banner .t1{ font-weight:700; font-size:13px; }
.banner .t2{ font-size:12px; color:var(--ink-soft); margin-top:3px; }
.banner .snd{ font-size:11px; color:var(--ink-faint); margin-top:5px; display:flex; align-items:center; gap:5px; }

.punch-actions{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.btn{ border-radius:10px; padding:11px 18px; font-size:13.5px; font-weight:700; border:1px solid transparent; display:inline-flex; align-items:center; gap:8px; }
.btn-primary{ background:var(--accent); color:var(--accent-ink); }
.btn-primary:hover{ filter:brightness(1.06); }
.btn-primary:disabled{ opacity:.55; cursor:not-allowed; filter:none; }
.btn-ghost{ background:var(--surface); border-color:var(--line-strong); color:var(--ink); }
.btn-ghost:hover{ background:var(--surface-2); }
.btn-sm{ padding:7px 12px; font-size:12.5px; border-radius:8px; }
.btn-block{ width:100%; justify-content:center; }
.btn-approve{ background:var(--st-work); color:#fff; }
.btn-reject{ background:transparent; border-color:var(--line-strong); color:var(--ink-soft); }

.table-scroll{ overflow-x:auto; }
table{ width:100%; border-collapse:collapse; }
th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-faint); font-weight:700; padding:0 10px 8px; border-bottom:1px solid var(--line); }
td{ padding:10px 10px; border-bottom:1px solid var(--line); font-size:13px; }
tr:last-child td{ border-bottom:none; }
tr.gap-row td{ text-align:center; font-size:11.5px; color:var(--ink-faint); font-style:italic; background:var(--surface-2); padding:6px 10px; }
.empty-row{ padding:20px 10px; text-align:center; color:var(--ink-faint); font-size:13px; }

/* Daily-detail report tables (admin + VA): rows can wrap to multiple lines
   (several punches in a day), so cells are top-aligned rather than the
   browser's default middle — otherwise short cells in a tall row drift to
   its vertical center and every column reads as slightly out of line. */
.report-table th.col-right, .report-table td.col-right{ text-align:right; }
.report-table td{ vertical-align:top; }
.report-table .note-cell{ cursor:pointer; }
.report-table .note-cell:hover{ color:var(--ink); }
.report-table .note-edit{ display:flex; flex-direction:column; gap:6px; min-width:180px; }
.report-table .note-edit textarea{ width:100%; min-height:52px; resize:vertical; font-size:12.5px; padding:6px 8px; border:1px solid var(--line-strong); border-radius:6px; background:var(--surface); color:var(--ink); font-family:inherit; }
.report-table .note-edit-actions{ display:flex; gap:8px; }

.weekchart{ display:flex; align-items:flex-end; gap:9px; height:120px; padding-top:8px; }
.weekchart .col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:8px; height:100%; justify-content:flex-end; }
.weekchart .bar{ width:100%; max-width:26px; border-radius:5px 5px 3px 3px; background:var(--accent-soft); position:relative; min-height:2px; }
.weekchart .bar .fill{ position:absolute; bottom:0; left:0; right:0; border-radius:5px 5px 3px 3px; background:var(--accent); }
.weekchart .bar.today .fill{ background:repeating-linear-gradient(135deg, var(--accent), var(--accent) 5px, color-mix(in srgb, var(--accent) 78%, transparent) 5px, color-mix(in srgb, var(--accent) 78%, transparent) 10px); }
.weekchart .dlabel{ font-size:10.5px; color:var(--ink-faint); font-weight:700; }
.weekchart .hlabel{ font-size:10px; color:var(--ink-faint); }
.weekfoot{ display:flex; justify-content:space-between; align-items:baseline; margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.weekfoot .big{ font-size:20px; font-weight:800; }
.weekfoot .of{ font-size:12px; color:var(--ink-faint); }

.field{ display:flex; flex-direction:column; gap:5px; }
.field label{ font-size:11.5px; font-weight:700; color:var(--ink-soft); }
.field input, .field textarea, .field select{ font-family:inherit; font-size:13px; padding:9px 10px; border-radius:8px; border:1px solid var(--line-strong); background:var(--surface-2); color:var(--ink); resize:vertical; width:100%; }
.field input:focus, .field textarea:focus, .field select:focus{ outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent); }
.field input[type="file"]{ cursor:pointer; font-size:12.5px; padding:8px 10px; }
.field input[type="file"]::file-selector-button{ font-family:inherit; font-size:12px; font-weight:700; padding:6px 12px; margin-right:10px; border:none; border-radius:6px; background:var(--accent); color:var(--accent-ink); cursor:pointer; }
/* The browser's own dropdown arrow is never precisely centered against a
   custom-padded box and varies per OS/browser — draw one ourselves so
   every select in the app lines up identically (same fix as invoice-app). */
.field select{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  padding-right:34px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236C6355' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 8 10 12 14 8'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:12px 12px;
}
.form-row{ display:flex; gap:10px; }
.form-row .field{ flex:1; }
.helper-note{ display:flex; gap:8px; align-items:flex-start; font-size:12px; color:var(--ink-soft); background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:10px 12px; margin-top:10px; }
.helper-note svg{ flex:none; color:var(--ink-faint); margin-top:1px; }

.notice-item{ display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); }
.notice-item:last-child{ border-bottom:none; }
.notice-date{ background:var(--surface-2); border:1px solid var(--line); border-radius:8px; padding:6px 9px; text-align:center; min-width:46px; flex:none; }
.notice-date .d{ font-size:15px; font-weight:800; line-height:1; }
.notice-date .m{ font-size:9.5px; text-transform:uppercase; color:var(--ink-faint); font-weight:700; }
.notice-body{ flex:1; }
.notice-body .top-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.notice-body .why{ font-size:12.5px; color:var(--ink-soft); margin-top:2px; }
.notice-meta{ font-size:11px; color:var(--ink-faint); margin-top:3px; }
a.notice-meta{ font-weight:600; }
a.notice-meta:hover{ color:var(--ink); text-decoration:underline; }

.avatar{ width:30px; height:30px; border-radius:50%; background:var(--accent-soft); color:var(--accent); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; flex:none; }
.person{ display:flex; align-items:center; gap:10px; }
.person .nm{ font-weight:700; font-size:13px; }
.person .loc{ font-size:11.5px; color:var(--ink-faint); }

.stat-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; min-width:0; }
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:14px 16px; box-shadow:var(--shadow-sm); min-width:0; }
.stat .k{ overflow-wrap:break-word; }
.stat .k{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-faint); font-weight:700; }
.stat .v{ font-size:22px; font-weight:800; margin-top:4px; }
.stat .d{ font-size:11.5px; margin-top:3px; }
.up{ color:var(--st-work); } .down{ color:var(--st-alert); }

/* bell / notifications */
.topbar-actions{ display:flex; gap:12px; align-items:flex-start; }
.bell-wrap{ position:relative; }
.bell-btn{ position:relative; width:38px; height:38px; border-radius:10px; border:1px solid var(--line-strong); background:var(--surface); display:flex; align-items:center; justify-content:center; color:var(--ink-soft); }
.bell-btn:hover{ background:var(--surface-2); }
.bell-btn .badge{ position:absolute; top:-6px; right:-6px; background:var(--st-alert); color:#fff; font-size:10px; font-weight:800; border-radius:999px; padding:1px 5px; min-width:16px; text-align:center; line-height:1.4; }
.bell-panel{ position:absolute; top:46px; right:0; width:340px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow-lg); z-index:30; display:none; }
.bell-panel.open{ display:block; }
.bell-panel-head{ padding:13px 16px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.bell-panel-head h4{ font-size:13px; }
.bell-list{ max-height:320px; overflow:auto; }
.bell-item{ padding:12px 16px; border-bottom:1px solid var(--line); }
.bell-item .who{ font-weight:700; font-size:12.5px; }
.bell-item .why{ font-size:12px; color:var(--ink-soft); margin-top:2px; }
.bell-item .when{ font-size:10.5px; color:var(--ink-faint); margin-top:2px; }
.bell-actions{ display:flex; gap:6px; margin-top:8px; }
.bell-foot{ padding:10px 16px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.bell-foot span{ font-size:11px; color:var(--ink-faint); }
.switch{ position:relative; width:32px; height:18px; border-radius:999px; background:var(--line-strong); flex:none; border:none; }
.switch.on{ background:var(--accent); }
.switch::after{ content:''; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; transition:left .15s ease; }
.switch.on::after{ left:16px; }
.empty-bell{ padding:24px 16px; text-align:center; font-size:12.5px; color:var(--ink-faint); }

.audit-head{ display:flex; align-items:center; gap:7px; }
.audit-head svg{ color:var(--ink-faint); flex:none; }
.audit-note{ font-size:11.5px; color:var(--ink-faint); }
.details-toggle{ background:none; border:1px solid var(--line-strong); border-radius:7px; padding:4px 9px; font-size:11.5px; font-weight:700; color:var(--ink-soft); }
.details-toggle:hover{ background:var(--surface-2); }
.audit-row{ display:none; }
.audit-row.open{ display:table-row; }
.audit-row td{ background:var(--surface-2); font-size:11.5px; color:var(--ink-soft); }

.seg{ display:flex; background:var(--surface-2); border:1px solid var(--line); border-radius:9px; padding:3px; }
.seg button{ border:none; background:transparent; padding:7px 13px; font-size:12.5px; font-weight:700; color:var(--ink-soft); border-radius:6px; }
.seg button.active{ background:var(--surface); color:var(--ink); box-shadow:var(--shadow-sm); }

.report-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex-wrap:wrap; gap:12px; }
.report-tznote{ font-size:12px; color:var(--ink-faint); margin-bottom:18px; display:flex; align-items:center; gap:6px; }

.page{ background:var(--surface); border:1px solid var(--line); border-radius:4px; box-shadow:var(--shadow-lg); max-width:760px; margin:0 auto; padding:40px 44px; }
.page-head{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:26px; padding-bottom:20px; border-bottom:2px solid var(--ink); }
.page-head h2{ font-size:22px; }
.page-head .per{ color:var(--ink-soft); font-size:13px; margin-top:4px; }
.page-brand{ text-align:right; font-size:11px; color:var(--ink-faint); font-weight:700; text-transform:uppercase; letter-spacing:.06em; }

.bigchart{ display:flex; gap:10px; margin:22px 0 8px; }
.yaxis{ display:flex; flex-direction:column; justify-content:space-between; height:220px; padding-bottom:26px; text-align:right; }
.yaxis span{ font-size:10.5px; color:var(--ink-faint); }
.chartarea{ flex:1; position:relative; height:246px; }
.gridlines{ position:absolute; inset:0 0 26px 0; display:flex; flex-direction:column; justify-content:space-between; }
.gridlines i{ display:block; height:1px; background:var(--line); }
.bars{ position:absolute; inset:0 0 0 0; display:flex; align-items:flex-end; gap:14px; padding-bottom:26px; height:220px; }
.bars .bcol{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:8px; position:relative; }
.bars .bar{ width:100%; max-width:38px; border-radius:6px 6px 3px 3px; background:var(--accent); position:relative; min-height:1px; }
.bars .bar .val{ position:absolute; top:-18px; left:0; right:0; text-align:center; font-size:11px; font-weight:700; color:var(--ink-soft); }
.bars .dname{ position:absolute; bottom:-24px; left:0; right:0; text-align:center; font-size:11px; font-weight:700; color:var(--ink-faint); }
.target-line{ position:absolute; left:0; right:0; border-top:2px dashed var(--st-lunch); }
.target-line span{ position:absolute; right:0; top:-16px; font-size:10px; color:var(--st-lunch); font-weight:700; background:var(--surface); padding:0 4px; }

.page-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:0; margin:38px 0 26px; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.page-stats div{ padding:14px 16px; border-right:1px solid var(--line); }
.page-stats div:last-child{ border-right:none; }
.page-stats .k{ font-size:10.5px; text-transform:uppercase; color:var(--ink-faint); font-weight:700; letter-spacing:.04em; }
.page-stats .v{ font-size:19px; font-weight:800; margin-top:4px; }

.page table{ margin-top:6px; }
.page th, .page td{ font-size:12.5px; }
.dl-btn{ display:flex; align-items:center; gap:8px; }

@media (max-width: 880px){
  .shell{ grid-template-columns:1fr; }
  .sidebar{ flex-direction:row; overflow-x:auto; align-items:center; }
  .nav{ flex-direction:row; }
  .nav-sep{ display:none; }
  .sidebar-foot{ margin-top:0; }
  .grid2{ grid-template-columns:1fr; }
  .stat-row{ grid-template-columns:repeat(2,1fr); }
  .page-stats{ grid-template-columns:repeat(2,1fr); }
  .page-stats div:nth-child(2){ border-right:none; }
  .bell-panel{ right:-40px; width:300px; }
}
