@font-face { font-family: Inter; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Lexend; src: url("../fonts/lexend-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Lexend; src: url("../fonts/lexend-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Lexend; src: url("../fonts/lexend-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --green: #1F7A34;
  --lime: #7AC943;
  --blue: #0E5A99;
  --sky: #29ABE2;
  --navy: #0B2545;
  --ink: #1D3557;
  --bg: #F6FBFF;
  --on-primary: #ffffff;
  --danger: #9F1239;
  --danger-bg: #FDE8EE;
  --card: #ffffff;
  --line: #D3E4F2;
  --ok-bg: #E7F6EA;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.45;
}
h1, h2, h3 { font-family: Lexend, Inter, sans-serif; color: var(--navy); line-height: 1.2; margin: 0 0 .4rem; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
p { margin: 0 0 .8rem; }
.skip {
  position: absolute; left: 8px; top: -40px; background: var(--navy); color: white; padding: 8px 12px; z-index: 5;
}
.skip:focus { top: 8px; }
.top {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: white; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 4;
}
.top img { width: 40px; height: 40px; object-fit: contain; }
.top strong { font-family: Lexend, Inter, sans-serif; font-size: 1.05rem; color: var(--navy); }
.wrap { width: min(720px, 100%); margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.banner, .flash, .note, .error {
  border-radius: 12px; padding: 12px 14px; margin: 0 0 12px;
}
.banner { background: #FFF6D8; color: var(--navy); border: 1px solid #E4C56A; }
.flash { background: var(--ok-bg); color: var(--navy); }
.note { background: white; border: 1px solid var(--line); }
.error, .field-error { color: var(--danger); background: var(--danger-bg); }
.field-error { display: block; padding: 6px 8px; border-radius: 8px; margin-top: 4px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; margin: 0 0 12px; box-shadow: 0 8px 24px rgba(11, 37, 69, .04);
}
.card h2 { font-size: 1.15rem; }
.time { font-family: Lexend, Inter, sans-serif; font-size: 1.55rem; color: var(--navy); }
.row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.chip, .status {
  display: inline-flex; align-items: center; min-height: 28px; padding: 2px 8px;
  border-radius: 999px; background: var(--lime); color: var(--navy); font-size: .85rem; font-weight: 600;
}
.status.scheduled { background: #E5F2FB; }
.status.completed { background: var(--ok-bg); }
.status.cancelled { background: #EEF2F6; }
.status.in_progress { background: #FFF3D6; }
.btn, button, .tabbar a, input, select, textarea {
  font: inherit; color: var(--ink);
}
.btn, button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 2px solid transparent;
  background: var(--green); color: var(--on-primary); text-decoration: none; font-weight: 600;
  width: 100%; margin-top: 8px;
}
.btn.secondary, button.secondary { background: white; color: var(--navy); border-color: var(--line); }
.btn.small, button.small { width: auto; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid #B7CDE0; background: white;
}
textarea { min-height: 96px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.cal-nav { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.cal-nav h1 {
  flex: 1 1 auto; min-width: 0; margin: 0; text-align: center;
  font-size: 1.05rem; line-height: 1.2; white-space: nowrap;
}
.cal-nav .cal-month {
  flex: 0 0 44px; width: 44px; min-width: 44px; height: 44px; min-height: 44px;
  margin: 0; padding: 0; font-size: 1.5rem; line-height: 1;
}
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; width: 100%; }
.day {
  min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 10px; color: var(--navy); background: white; border: 1px solid var(--line);
  position: relative;
}
.day strong { font-size: .95rem; line-height: 1; }
.day.on { background: var(--green); color: var(--on-primary); }
.day.today { box-shadow: inset 0 0 0 2px var(--green); }
.day .dot {
  position: absolute; left: 50%; bottom: 5px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--green);
}
.day.on .dot { background: white; }
.day .job-count {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  top: 0; left: 0;
}
.kpis { display: grid; gap: 10px; }
.kpi span { display: block; font-size: .85rem; color: var(--navy); }
.kpi strong { font-family: Lexend, Inter, sans-serif; font-size: 1.4rem; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: white; border-top: 1px solid var(--line);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 4;
}
.tabbar a {
  min-height: 48px; text-decoration: none; color: var(--navy); text-align: center;
  font-size: .72rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.tabbar a[aria-current="page"] { color: var(--green); font-weight: 700; }
.muted { color: #3E5A73; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.intro {
  position: fixed; inset: 0; z-index: 20; margin: 0; padding: 0;
  width: 100%; height: 100%; height: 100dvh;
  background: var(--navy); overflow: hidden;
}
.intro-stage { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; }
.intro img, .intro video {
  position: absolute; inset: 0; display: block; margin: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: cover; object-position: center center; background: transparent;
}
.intro form { position: absolute; inset: 0; margin: 0; pointer-events: none; }
.intro-skip {
  position: absolute; pointer-events: auto; margin: 0;
  top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  width: auto; min-width: 72px; z-index: 2; background: white; color: var(--navy);
}
.intro.is-fading .intro-stage { animation: intro-fade .45s ease forwards; }
@keyframes intro-fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .intro.is-fading .intro-stage { animation: none; }
}
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 8px; align-items: center; }
.bar { background: #E7F1F8; border-radius: 8px; overflow: hidden; height: 16px; }
.bar span { display: block; background: var(--green); height: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.login-logo { width: min(280px, 80%); display: block; margin: 12px auto 8px; }
.center { text-align: center; }
.split { display: flex; gap: 8px; }
.split > * { flex: 1; }
.check { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.check input { width: 24px; height: 24px; }
