:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #152144;
  background: #f3f5fa;
  --navy: #111b43;
  --blue: #2227cb;
  --red: #bd1126;
  --muted: #586580;
  --line: #e0e5ef;
  --white: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .66; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #7a7deb; outline-offset: 3px;
}
a { color: var(--blue); }
svg { width: 20px; height: 20px; flex: none; vertical-align: middle; }
h1, h2, p { margin: 0; }
h1, h2 { letter-spacing: -.035em; line-height: 1.1; }
h1 { font-size: clamp(2.25rem, 5vw, 3.35rem); }
h2 { font-size: 1.3rem; }
p { line-height: 1.55; }
small { font-size: .78rem; }
.muted { color: var(--muted); }
.eyebrow { font-size: .73rem; font-weight: 750; letter-spacing: .16em; color: var(--blue); margin-bottom: .6rem; }
.primary, .secondary, .button {
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: 9px; min-height: 44px; padding: .65rem 1rem;
  font-size: .9rem; font-weight: 700; white-space: nowrap;
}
.primary { background: var(--blue); color: white; }
.primary:hover { background: #171aa2; }
.primary.danger { background: var(--red); }
.primary.danger:hover { background: #981222; }
.secondary { border-color: var(--line); background: white; color: var(--navy); }
.secondary:hover { background: #f4f5ff; }
.compact { min-height: 34px; padding: .35rem .7rem; font-size: .79rem; }
.text-button { padding: .35rem 0; border: 0; background: none; color: var(--blue); font-weight: 650; }
label { display: grid; gap: .4rem; color: var(--navy); font-weight: 650; font-size: .83rem; min-width: 0; }
input, select {
  border: 1px solid #cdd5e6; border-radius: 8px; background: white; padding: .67rem .75rem;
  color: var(--navy); min-width: 0; width: 100%; min-height: 44px; font-size: .94rem;
}
form { display: grid; gap: .9rem; }
.loading { margin: 12vh auto; max-width: 560px; padding: 1rem; }
.auth-layout { display: grid; grid-template-columns: 1.04fr 1fr; min-height: 100vh; background: white; }
.auth-brand {
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
  padding: clamp(2rem, 5vw, 5rem); min-height: 570px; position: relative; color: white;
  background: radial-gradient(ellipse at 100% 68%, #3337ba 0, transparent 62%),
    linear-gradient(145deg, #101837 20%, #1c215f 70%, #202584);
}
.auth-brand::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34%; height: 5px; background: #f02b3e; }
.logo-box { padding: .6rem .8rem; background: white; border-radius: 10px; width: max-content; max-width: 100%; }
.logo { display: block; width: 158px; height: auto; max-width: 100%; }
.brand-copy h1 { font-size: clamp(3.05rem, 6.5vw, 6.2rem); letter-spacing: -.07em; line-height: .98; margin: 1rem 0; }
.brand-copy h1 span { color: #ff5260; }
.brand-copy > p:last-child { max-width: 340px; color: #e2e5ff; font-size: 1.12rem; }
.brand-copy .eyebrow { color: #e3e6ff; }
.signal { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: #fb4859; vertical-align: 1px; }
.brand-footer { color: #d2d8f8; font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.brand-footer span { color: #fb4859; margin: 0 .5rem; }
.auth-panel { display: grid; align-items: center; justify-items: center; padding: 2.5rem; }
.auth-card { width: min(100%, 400px); }
.auth-card .tile { margin-bottom: 1.2rem; }
.auth-card h2 { font-size: clamp(1.8rem, 3.5vw, 2.65rem); }
.auth-card > p.muted { margin: .75rem 0 1.7rem; }
.auth-card form { gap: 1rem; }
.auth-card form button { justify-content: space-between; margin-top: .25rem; }
.auth-card > button { margin-top: .75rem; }
.topbar { background: white; border-top: 4px solid var(--blue); }
.top-inner, .nav-inner, .shell, .footer { width: min(1120px, calc(100% - 3rem)); margin: auto; }
.top-inner { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: .85rem; }
.brand-link, .account { display: flex; gap: .85rem; align-items: center; color: var(--navy); }
.brand-link { text-decoration: none; font-weight: 750; }
.brand-link .logo { width: clamp(112px, 14vw, 146px); }
.brand-divider { width: 1px; height: 29px; background: var(--line); }
.avatar { width: 35px; height: 35px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--blue); background: #eef0ff; font-weight: 750; font-size: .78rem; }
.account-text { max-width: 170px; overflow-wrap: anywhere; }
.account-text strong, .account-text small { display: block; }
.account-text strong { font-size: .85rem; }
.account-text small { color: var(--muted); }
.icon-button { border: 1px solid var(--line); border-radius: 8px; padding: .45rem; background: white; color: var(--navy); }
.nav { background: var(--navy); }
.nav-inner { display: flex; gap: .35rem; flex-wrap: wrap; }
.nav a { display: flex; align-items: center; gap: .5rem; padding: .85rem 1rem; border-bottom: 3px solid transparent; text-decoration: none; color: #d9ddf3; font-weight: 650; font-size: .86rem; }
.nav a:hover, .nav a[aria-current] { background: #202c5b; color: white; }
.nav a[aria-current] { border-bottom-color: #ff354b; }
.shell { padding: 2.5rem 0 1rem; min-height: 65vh; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.55rem; }
.intro h1 + p { color: var(--muted); margin-top: .55rem; }
.date-label { display: flex; align-items: center; gap: .55rem; flex: none; border: 1px solid var(--line); border-radius: 8px; background: white; padding: .55rem .8rem; font-size: .8rem; color: var(--muted); }
.date-label svg { color: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.leave-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { border-radius: 12px; border: 1px solid var(--line); background: white; display: flex; align-items: start; gap: .8rem; padding: 1rem; }
.stat strong { display: block; font-size: clamp(1.1rem, 2vw, 1.55rem); letter-spacing: -.045em; margin: .12rem 0; }
.stat .muted { font-weight: 650; font-size: .8rem; }
.stat small { color: var(--muted); }
.tile { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--blue); background: #edf0ff; }
.tile.red { color: #b91430; background: #ffecef; }
.clock-display { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: clamp(1.2rem, 3vw, 2rem); margin: 1rem 0; border-radius: 12px; background: radial-gradient(ellipse at 100% 90%, #2c3699, transparent 75%), var(--navy); color: white; }
.clock-pill { border: 1px solid #737db9; border-radius: 999px; padding: .35rem .7rem; font-weight: 700; font-size: .68rem; letter-spacing: .1em; }
.live-time { font-size: clamp(2.6rem, 5.5vw, 3.75rem); font-variant-numeric: tabular-nums; font-weight: 740; letter-spacing: -.065em; line-height: 1.12; margin: .65rem 0 .35rem; }
.timezone { font-size: .68rem; font-weight: 700; letter-spacing: .14em; color: #d5dbff; }
.clock-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.clock-card { display: flex; flex-direction: column; align-items: start; gap: 1rem; padding: 1.15rem 1.3rem; background: white; border: 1px solid var(--line); border-radius: 12px; }
.clock-card-heading { display: flex; align-items: start; gap: .8rem; }
.clock-card-heading p { color: var(--muted); margin-top: .3rem; font-size: .86rem; }
.clock-in-form { width: 100%; justify-items: start; margin-top: auto; }
.active-entry { display: grid; gap: .3rem; max-width: 100%; overflow-wrap: anywhere; font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.refresh-button { align-self: end; }
.overtime-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
#overtime { width: 100%; }
#overtime button { justify-self: start; }
.overtime-total { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .65rem .8rem; background: #eef0ff; border-radius: 8px; }
.overtime-total output { color: var(--blue); font-size: .9rem; font-weight: 700; }
.location-note { display: flex; align-items: start; gap: .4rem; color: #e0e4ff; font-size: .83rem; max-width: 280px; }
.location-note svg { width: 17px; height: 17px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 1.3rem; border-bottom: 1px solid var(--line); }
.panel-heading p, .padded > p { font-size: .86rem; color: var(--muted); margin-top: .3rem; }
.padded { padding: 1.3rem; }
.inline-form { margin-top: 1rem; grid-template-columns: minmax(145px, 1.2fr) minmax(120px, 1fr) minmax(120px, 1fr) auto; align-items: end; }
.report-form { margin-top: 1.1rem; gap: 1.15rem; }
.report-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .75rem; }
.report-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.report-options > div { background: #f8f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.report-options h2 { margin-top: .6rem; }
.report-options p { color: var(--muted); font-size: .86rem; margin: .4rem 0 .85rem; }
.leave-count { grid-column: 1 / -1; display: flex; gap: .55rem 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.leave-count strong { color: var(--blue); }
.scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .86rem; }
th, td { padding: .7rem 1rem; vertical-align: middle; }
th { color: var(--muted); background: #f8f9fd; font-weight: 700; white-space: nowrap; font-size: .78rem; }
td { border-top: 1px solid var(--line); overflow-wrap: anywhere; }
td small { color: var(--muted); display: block; margin-top: .2rem; }
.coordinates { white-space: nowrap; display: block; font-size: .76rem; margin-top: .3rem; }
.coordinates svg { width: 15px; height: 15px; margin-right: .2rem; }
.badge { display: inline-block; border-radius: 20px; font-size: .75rem; font-weight: 700; padding: .25rem .55rem; }
.badge.approved, .badge.active { background: #e1f5e9; color: #135a38; }
.badge.pending { background: #fff1d7; color: #775214; }
.badge.declined { background: #ffe8eb; color: #982039; }
.empty { display: grid; justify-items: center; gap: .35rem; text-align: center; padding: 2rem 1rem; }
.empty .tile { margin-bottom: .3rem; }
.empty > span:last-child { color: var(--muted); font-size: .86rem; }
.banner { border-radius: 8px; border: 1px solid #efdcac; color: #714a11; background: #fff6e3; padding: .75rem 1rem; margin-bottom: 1rem; font-size: .87rem; }
.footer { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .73rem; padding: 1rem 0 1.5rem; }
.footer span:first-child { letter-spacing: .13em; font-weight: 750; }
.notice { position: fixed; bottom: 1.25rem; right: 1.25rem; max-width: min(460px, calc(100% - 2.5rem)); z-index: 5; border-radius: 10px; background: #17244c; color: white; padding: .85rem 1rem; box-shadow: 0 8px 24px #15214435; }
.notice.error { background: #981222; }
dialog { width: min(430px, calc(100% - 2rem)); color: var(--navy); border: 1px solid var(--line); border-radius: 13px; padding: 1.4rem; }
dialog::backdrop { background: #111b4388; }
@media (max-width: 830px) {
  .leave-stats, .inline-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clock-cards { grid-template-columns: 1fr; }
}
@media (max-width: 660px) {
  .auth-layout { grid-template-columns: 1fr; }
  .report-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-fields label:first-child { grid-column: 1 / -1; }
  .report-options { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 1.4rem 1.6rem 1.65rem; gap: 1.15rem; }
  .auth-brand .logo { width: 110px; }
  .brand-copy h1 { margin: .45rem 0; }
  .brand-copy > p:last-child { font-size: .92rem; }
  .brand-footer { display: none; }
  .auth-panel { padding: 1.8rem 1.5rem 2.5rem; align-items: start; }
  .top-inner, .nav-inner, .shell, .footer { width: calc(100% - 1.5rem); }
  .account-text, .brand-divider { display: none; }
  .top-inner { min-height: 65px; }
  .brand-link, .account { gap: .5rem; }
  .nav a { padding: .7rem .45rem; gap: .3rem; font-size: .78rem; }
  .nav a svg { width: 16px; height: 16px; }
  .shell { padding-top: 1.5rem; }
  .intro { align-items: start; flex-direction: column; gap: .65rem; }
  .stat { flex-direction: column; gap: .4rem; padding: .6rem; }
  .stats { gap: .45rem; }
  .stat small { font-size: .7rem; }
  .clock-display { flex-direction: column; align-items: start; }
  .panel-heading { padding: 1rem; flex-wrap: wrap; }
  th, td { padding: .55rem .7rem; }
}
@media (max-width: 480px) {
  .overtime-fields { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .inline-form { grid-template-columns: 1fr; }
  .nav a { padding-inline: .25rem; }
}
