/* WP-TimeKeeper – corporate design shared with WP-Invoicer (see corporate-design/README.md) */
@font-face { font-family: "Urbanist"; src: url("fonts/Urbanist-wght.ttf") format("truetype"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #F4F5FA; --surface: #FFFFFF; --surface-2: #EEF0F8; --border: #D6D9EA; --text: #0E1330; --muted: #4F5674;
  --brand: #172983; --accent: #0A5BD3; --accent-ink: #FFFFFF; --accent-soft: #E6EEFB;
  --pos: #1C6352; --neg: #A3450A; --warn-bg: #FBEFE4; --warn: #8A3A08;
  --hol: #E6EEFB; --hol-ink: #1F4AB0; --clo: #E8EAF6; --clo-ink: #172983;
  --vac: #E2F0EB; --vac-ink: #1C6352; --sick: #F8EAE1; --sick-ink: #A3450A; --comp: #FFF2DC; --comp-ink: #845106; --oth: #EEF0F8; --oth-ink: #4F5674;
  --radius: 14px; --shadow: 0 1px 2px rgba(14,19,48,.05), 0 4px 14px rgba(14,19,48,.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Urbanist", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C0F22; --surface: #141936; --surface-2: #1B2146; --border: #262C52; --text: #EAECF7; --muted: #9EA3C4;
    --brand: #3A4FC4; --accent: #8F9CF2; --accent-ink: #0C0F22; --accent-soft: #1F2757;
    --pos: #6CC9A6; --neg: #F0A06A; --warn-bg: #33240F; --warn: #F2C27A;
    --hol: #1F2757; --hol-ink: #AEB8FA; --clo: #232A55; --clo-ink: #C3CAF8;
    --vac: #13342C; --vac-ink: #7FD3B3; --sick: #3A2416; --sick-ink: #F0A06A; --comp: #3A2C12; --comp-ink: #F2C27A; --oth: #1B2146; --oth-ink: #B9BDD8;
    --shadow: none; color-scheme: dark;
  }
}
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .brand .logo-light { display: none; } .brand .logo-dark { display: block; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, .stat .value, .big-num, .month-nav strong { font-family: var(--font-head); }
h1 { font-size: 1.85rem; font-weight: 780; margin: 0 0 .2rem; letter-spacing: -.025em; }
h2 { font-size: 1.15rem; font-weight: 750; margin: 0 0 .8rem; letter-spacing: -.01em; } h3 { font-size: .95rem; margin: 1.2rem 0 .5rem; }
.muted { color: var(--muted); } .small { font-size: .85em; } .pad { padding: 1.2rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.boot, .loading { padding: 3rem; text-align: center; color: var(--muted); }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: .55rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } } .btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; } .btn.ghost:hover { border-color: var(--text); background: transparent; } .btn.danger { color: var(--neg); border-color: var(--neg); background: transparent; }
.btn.small { padding: .3rem .6rem; font-size: .85rem; } .btn.block { width: 100%; justify-content: center; padding: .7rem; }
.icon { border: 0; background: transparent; color: var(--muted); font-size: 1.15rem; width: 2rem; height: 2rem; border-radius: 6px; cursor: pointer; line-height: 1; }
.icon:hover:not(:disabled) { background: var(--surface-2); color: var(--text); } .icon:disabled { opacity: .25; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .7rem; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn:focus-visible, .icon:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: .3rem; } .field > span { font-size: .82rem; color: var(--muted); font-weight: 550; }
.check { display: flex; align-items: center; gap: .5rem; } .check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; } .span2 { grid-column: span 2; }
.hint { font-size: .85rem; color: var(--muted); margin: .8rem 0 0; }
.card > .hint { margin: 0 0 1rem; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth { background: linear-gradient(160deg, #2F74E6 0%, #0A5BD3 35%, #172983 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 2rem 2rem 1.5rem; box-shadow: 0 30px 80px rgba(8,11,30,.35); }
.auth-card h2 { font-size: 1.5rem; }
.auth-card .lang-switch { display: flex; justify-content: center; }
.auth-card .lang-switch { margin: .8rem 0 1rem; }
.brand { display: block; } .brand img { width: calc(100% + .6rem); height: auto; display: block; margin: -.4rem 0 0 -.6rem; }
.brand.big { display: block; } .brand.big img { width: 85%; margin: 0 auto .5rem; }
.made-by { margin-top: 1.5rem; font-size: .8rem; color: var(--muted); text-align: center; }
.lang-switch { display: inline-flex; gap: .2rem; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 500; padding: .25rem .45rem; border-radius: 4px; cursor: pointer; }
.lang-switch button.on { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }

/* shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.shell > * { min-width: 0; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: .3rem; position: sticky; top: 0; height: 100vh; }
.side .company { color: var(--muted); font-size: .85rem; margin: .3rem 0 1rem .2rem; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side nav a, .side .me { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); font-weight: 500; }
.side nav a:hover, .side .me:hover { background: var(--surface-2); text-decoration: none; }
.side nav a.active, .side .me.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ico { width: 1.2rem; text-align: center; opacity: .8; }
.nav-sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem .6rem .3rem; font-weight: 600; }
.side-foot { border-top: 1px solid var(--border); padding-top: .8rem; display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
main#view { padding: 1.8rem 2.2rem 3rem; max-width: 1280px; width: 100%; outline: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.page-head p { margin: 0; }
.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.month-nav { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 .25rem; }
.month-nav strong { min-width: 8.5rem; text-align: center; text-transform: capitalize; font-weight: 700; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.row-head h2 { margin: 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; } .card.scroll { overflow-x: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.cards.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cards .card { margin: 0; }
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat .label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 1.85rem; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cards.small .stat .value { font-size: 1.35rem; }
.stat .sub { font-size: .8rem; color: var(--muted); }
.meter { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: .3rem 0 .1rem; } .meter i { display: block; height: 100%; background: var(--accent); width: 0; border-radius: 3px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; } .cols > .card { margin: 0; }
.notice { display: block; background: var(--brand); color: #fff; padding: .85rem 1.2rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
a.notice:hover { text-decoration: none; filter: brightness(1.1); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

/* lists */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { display: flex; gap: .8rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
ul.plain li:last-child { border-bottom: 0; } ul.plain li.past { opacity: .5; }
ul.plain .date { min-width: 9.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
ul.plain li .del, ul.plain li .deladj { margin-left: auto; }
.entries { list-style: none; padding: 0; margin: 0 0 1rem; } .entries li { display: flex; gap: .8rem; padding: .35rem 0; font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .quick input[type=number] { width: 5.5rem; }
dl.kv { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 0 0 1rem; } dl.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* badges */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 6px; background: var(--oth); color: var(--oth-ink); margin-right: .3rem; white-space: nowrap; }
.badge.muted { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.badge.hol { background: var(--hol); color: var(--hol-ink); } .badge.clo { background: var(--clo); color: var(--clo-ink); }
.abs-vacation { background: var(--vac); color: var(--vac-ink); } .abs-sick, .abs-accident { background: var(--sick); color: var(--sick-ink); }
.abs-comp { background: var(--comp); color: var(--comp-ink); } .abs-military, .abs-training, .abs-other { background: var(--oth); color: var(--oth-ink); }
.status { font-size: .8rem; font-weight: 600; } .st-pending { color: var(--warn); } .st-approved { color: var(--pos); } .st-rejected { color: var(--neg); text-decoration: line-through; }

/* tables */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: .5rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; background: var(--surface); position: sticky; top: 0; padding-top: .75rem; padding-bottom: .75rem; }
tfoot th { background: var(--surface); border-top: 2px solid var(--border); font-weight: 700; }
.num { text-align: right; white-space: nowrap; }
td.actions { text-align: right; white-space: nowrap; } td.actions .btn { margin-left: .3rem; }
tr.inactive td { opacity: .55; }
table.days td { padding: .38rem .8rem; } table.days td.d { white-space: nowrap; width: 7.5rem; }
table.days .wd { display: inline-block; width: 2.2rem; color: var(--muted); text-transform: capitalize; }
table.days tr.we td { background: var(--surface-2); } table.days tr.hol td { background: var(--hol); }
table.days tr.today td.d { box-shadow: inset 3px 0 var(--accent); font-weight: 700; }
table.days tr.future td { color: var(--muted); }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .15rem .5rem; margin: .1rem .3rem .1rem 0; font: inherit; font-size: .85rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--accent); } .chip small { color: var(--muted); }

/* timeline */
.timeline { font-size: .82rem; overflow-x: auto; }
.tl-head, .tl-row { display: grid; grid-template-columns: 9rem 1fr; gap: .6rem; align-items: center; min-width: 640px; }
.tl-months { display: grid; grid-template-columns: repeat(12, 1fr); color: var(--muted); text-transform: capitalize; }
.tl-months span { border-left: 1px solid var(--border); padding-left: .25rem; }
.tl-row { padding: .25rem 0; } .tl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 18px; background: var(--surface-2); border-radius: 4px; }
.tl-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; min-width: 3px; }
.tl-bar.abs-vacation { background: var(--vac-ink); } .tl-bar.abs-comp { background: var(--comp-ink); } .tl-bar.abs-sick, .tl-bar.abs-accident { background: var(--sick-ink); }
.tl-bar.abs-military, .tl-bar.abs-training, .tl-bar.abs-other { background: var(--oth-ink); } .tl-bar.pending { opacity: .45; }

/* tabs & forms */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tabs a { padding: .55rem .9rem; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-color: var(--accent); font-weight: 700; } .tabs a:hover { text-decoration: none; color: var(--text); }
.inline-form { display: flex; gap: .7rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.form-foot { margin-top: 1.2rem; display: flex; justify-content: flex-end; }
.days-pick { display: flex; gap: .4rem; flex-wrap: wrap; }
.days-pick label { display: flex; align-items: center; gap: .3rem; border: 1px solid var(--border); border-radius: 999px; padding: .35rem .6rem; text-transform: capitalize; }
.days-pick input { accent-color: var(--accent); }
.adj-form { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr auto; gap: .4rem; margin-top: .6rem; }
.pwbox code { display: block; font-size: 1.4rem; padding: .8rem; background: var(--surface-2); border-radius: 8px; text-align: center; letter-spacing: .05em; user-select: all; }
.userpick { min-width: 12rem; }

/* modal */
dialog { border: 1px solid var(--border); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 2rem)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(8,11,30,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
dialog header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.3rem; border-bottom: 1px solid var(--border); }
dialog header h2 { margin: 0; }
.modal-body { padding: 1.2rem 1.3rem; max-height: 70vh; overflow-y: auto; }
dialog footer { display: flex; gap: .5rem; align-items: center; padding: .9rem 1.3rem; border-top: 1px solid var(--border); }
.grow { flex: 1; } .big-num { font-size: 1.4rem; font-weight: 650; padding-top: .2rem; font-variant-numeric: tabular-nums; }

#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 2rem); background: #0E1330; color: #fff; padding: .65rem 1.1rem; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .2s; font-weight: 550; z-index: 100; max-width: calc(100vw - 2rem); }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.err { background: var(--neg); color: #fff; }

/* responsive */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side .brand { margin-right: auto; } .side .brand img { width: auto; height: 3.2rem; margin: -.3rem 0 -.3rem -.4rem; }
  table.days td { padding: .35rem .5rem; } table.days td.d { width: auto; }
  .month-nav strong { min-width: 7rem; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .6rem 1rem; gap: .5rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .side .company { display: none; }
  .side nav { flex-direction: row; order: 3; width: 100%; overflow-x: auto; flex: none; gap: .2rem; }
  .side nav a { white-space: nowrap; padding: .4rem .6rem; font-size: .9rem; } .nav-sep { display: none; }
  .side-foot { flex-direction: row; border: 0; padding: 0; margin-left: auto; align-items: center; }
  .side .me span:last-child { display: none; }
  main#view { padding: 1.2rem 1rem 3rem; }
  .cols { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; } .span2 { grid-column: auto; }
  .adj-form { grid-template-columns: 1fr 1fr; }
  table.data { display: block; overflow-x: auto; white-space: nowrap; }
  table.days th:nth-child(3), table.days td:nth-child(3) { display: none; }
  h1 { font-size: 1.35rem; }
}
@media (max-width: 520px) { .side-foot .lang-switch { display: none; } .side .brand img { height: 2.8rem; } }

/* sign-in extras, company switch */
.form-error { color: var(--neg); font-size: .9rem; min-height: 1em; margin: 0; }
.center { text-align: center; } .pad { padding: 1.2rem; }
.auth-card h2 { margin-top: .8rem; } .auth-card .stack + p { margin-top: 1rem; }
.company-switch { margin: .3rem 0 1rem; width: 100%; font-weight: 600; }
@media (max-width: 900px) { .company-switch { order: 2; width: auto; margin: 0; } }

/* customers, customer report, import */
.cust { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .4rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: .2rem; vertical-align: 1px; white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.inline-form.top { margin: 0 0 1.2rem; padding: 0 0 1rem; border-top: 0; border-bottom: 1px solid var(--border); }
.list-tools { margin-bottom: 1rem; } .list-tools input[type=search] { flex: 1 1 14rem; max-width: 22rem; }
.list-tools label { display: inline-flex; gap: .35rem; align-items: center; color: var(--muted); font-size: .9rem; }
.empty-box { padding: 2rem 1rem; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
dialog.wide { width: min(980px, calc(100vw - 2rem)); }
.scroll-box { max-height: 55vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.scroll-box table th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
table.compact th, table.compact td { padding: .35rem .6rem; font-size: .88rem; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 2rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; text-align: center; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .hint { margin: 0; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .7rem; margin-bottom: 1rem; }
