@font-face {
  font-family: Rubik;
  src: url("/fonts/Rubik-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Rubik;
  src: url("/fonts/Rubik-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  font-family: Rubik, "Noto Sans", system-ui, sans-serif;
  font-size: 16px;
  --button: linear-gradient(108deg, #2358b6, #4b42b4 64%, #6636a5);
  --paper: #f4f3fa;
  --surface: #ffffff;
  --ink: #1c1a32;
  --muted: #57556d;
  --line: #d6d4e6;
  --accent: #4438a2;
  --on-accent: #ffffff;
  --soft: #eae8fa;
  --focus: #5949bd;
  --danger: #a53343;
  --wordmark: linear-gradient(105deg, #075f8c 0%, #4149aa 52%, #73389a 100%);
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #44406b;
  background: linear-gradient(105deg, #091232, #131336 60%, #261441);
  color: #f5f3ff;
  min-height: 72px;
  padding: 12px max(4vw, 20px);
  gap: 16px;
}
.brand,
.row,
.actions,
#tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  gap: 10px;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
  margin: 8px 0 22px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.025em;
  margin: 0 0 13px;
}
p,
.sub,
small {
  color: var(--muted);
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
input:not([type="checkbox"]) {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 9px 14px;
  max-width: 100%;
  line-height: 1.35;
}
button {
  cursor: pointer;
  font-weight: 400;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
button:enabled:hover {
  border-color: var(--accent);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.primary,
button.active {
  background: var(--button);
  border-color: #4b42ac;
  color: #fff;
}
button:disabled {
  opacity: .55;
  cursor: default;
}
button.primary { font-weight: 700; }
button:enabled:active { box-shadow: inset 0 0 0 2px var(--accent); }
.danger {
  color: var(--danger);
}
.shell {
  max-width: 1400px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(150px, 205px) minmax(0, 1fr);
  gap: 4vw;
  padding: 32px max(4vw, 20px);
}
nav {
  display: grid;
  align-content: start;
  gap: 5px;
  position: sticky;
  top: 20px;
  height: fit-content;
}
nav:empty {
  display: none;
}
.shell:has(nav:empty) {
  display: block;
}
nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  text-align: start;
  background: transparent;
  min-height: 44px;
}
nav button.active {
  color: var(--accent);
  background: var(--soft);
}
nav svg {
  width: 20px;
  height: 20px;
  flex: none;
}
main {
  min-width: 0;
  padding-bottom: 40px;
}
.card,
section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 3px 18px #17133b06;
  padding: clamp(17px, 2.3vw, 29px);
  margin: 0 0 18px;
}
.hero {
  background: radial-gradient(ellipse at 4% 0%, #2b5096 0, transparent 64%),
    linear-gradient(108deg, #182951, #252048 62%, #4b2b7f);
  color: #ffffff;
  border: 0;
}
.hero small,
.hero p {
  color: #e4efff;
}
.hero .metric {
  color: #c9f0ff;
}
.metric {
  font-size: clamp(38px, 5vw, 65px);
  font-weight: 700;
  letter-spacing: -0.06em;
  margin: 8px 0;
}
.row {
  justify-content: space-between;
  gap: 12px;
}
.list {
  display: grid;
  gap: 0;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.item:last-child {
  border: 0;
}
.item > div:first-child {
  min-width: 0;
}
.actions {
  margin: 12px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  color: var(--accent);
  padding: 4px 9px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 650;
}
.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.off {
  color: var(--muted);
  background: var(--paper);
}
.pending {
  color: #703e12;
  background: #ffe1ba;
}
.auth {
  max-width: 480px;
  margin: clamp(10px, 6vh, 75px) auto;
}
.auth h1 {
  font-size: 38px;
}
.fields,
form {
  display: grid;
  gap: 13px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 0.91rem;
  color: var(--muted);
}
label input,
label select,
textarea {
  width: 100%;
  color: var(--ink);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.days {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.days label {
  border: 1px solid var(--line);
  min-height: 44px;
  border-radius: 10px;
  padding: 6px 9px;
}
.weekgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.weekgrid button {
  padding: 4px;
  min-width: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
  min-height: 76px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.periodControl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 3px;
  padding: 3px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.periodControl button { min-height: 44px; border: 0; border-radius: 10px; padding-inline: 11px; }
.periodControl button:not(.active) { background: transparent; }
.periodControl button:focus-visible { outline-offset: -3px; }
.bars {
  position: relative;
  display: flex;
  gap: 4px;
  align-items: end;
  overflow-x: auto;
  padding: 10px 2px 8px;
  margin: 12px 0 8px;
  border-block-end: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 31px, var(--line) 31px 32px) 0 calc(100% - 36px) / 100% 96px no-repeat;
}
.bars button {
  flex: 1 0 0;
  min-width: 25px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background: transparent;
  border: 0;
  padding: 4px 0 2px;
  gap: 4px;
  color: var(--muted);
  font-size: .76rem;
}
.bars button:hover { background: var(--soft); }
.bars svg { inline-size: 100%; max-inline-size: 44px; block-size: 112px; }
.barValue { color: var(--ink); font-variant-numeric: tabular-nums; font-size: .81rem; }
.barLabel { padding-block: 3px; }
.barSky { stop-color: #18a9d4; }
.barBlue { stop-color: #4c71d8; }
.barIndigo { stop-color: #6c4cb4; }
.bars [aria-current="date"] .barSky { stop-color: #0799d1; }
.bars [aria-current="date"] .barBlue { stop-color: #3558c5; }
.bars [aria-current="date"] .barIndigo { stop-color: #6240ab; }
.bars [aria-current="date"] .barLabel { color: var(--accent); font-weight: 700; }
.monthBars button { min-inline-size: 36px; }
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(15px, 4vw, 26px);
  width: min(530px, 94vw);
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #101a368c;
}
dialog h2 {
  margin: 0;
}
code {
  overflow-wrap: anywhere;
  user-select: all;
}
.parentContent {
  min-width: 0;
}
.parentContent:has(.ad:not([hidden])) main {
  padding-bottom: 0;
}
.ad {
  border-block-start: 1px solid var(--line);
  padding: 10px 4px 14px;
  margin-block-end: env(safe-area-inset-bottom);
  color: var(--muted);
}
.ad small {
  display: block;
  font-size: 11px;
  margin-block-end: 4px;
}
.ad a {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  max-width: 100%;
  font-size: 14px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.ad img,
.publisherPreview img {
  display: block;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  align-self: flex-start;
}
.publisher {
  max-width: 650px;
  margin: 2rem auto;
  padding: 0 16px;
}
.publisher form {
  display: grid;
  gap: 12px;
}
[hidden] {
  display: none !important;
}
#notice:not(:empty) {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #152b59;
  color: white;
  padding: 10px 17px;
  border-radius: 9px;
  box-shadow: 0 3px 16px #0003;
  max-width: 92vw;
  text-align: center;
}
[dir="rtl"] #notice:not(:empty) {
  transform: translateX(50%);
}
details {
  margin: 8px 0;
}
summary {
  cursor: pointer;
}
table {
  border-collapse: collapse;
  width: 100%;
}
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
}
.breakword {
  overflow-wrap: anywhere;
}
.secret {
  padding: 14px;
  background: var(--soft);
  border-radius: 8px;
}
@media print {
  #sponsor,
  header,
  nav,
  .actions,
  button,
  #tools,
  #notice,
  dialog {
    display: none !important;
  }
  .shell,
  main {
    display: block;
    padding: 0;
  }
  section {
    page-break-inside: avoid;
  }
  body {
    background: white;
    color: black;
  }
}

.brand {
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.appIdentity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.appIdentity img {
  object-fit: contain;
  border-radius: 8px;
}
.helpButton {
  flex: 0 0 46px;
  width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}
.guideLink {
  margin-block-end: 16px;
}
.guideArticle {
  border-top: 1px solid var(--line);
  margin: 0;
}
.guideArticle summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.4;
  padding-block: 13px;
  min-height: 48px;
}
.guideArticle p {
  line-height: 1.5;
  margin-block: 0 14px;
}


/* Limit the gradient to the letters. Body text and controls keep solid colours. */
h1 { color: var(--accent); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 {
    inline-size: fit-content;
    max-inline-size: 100%;
    background: var(--wordmark);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }
}
.chip { font-weight: 700; }
:where(.row, .actions, .item) > * { max-inline-size: 100%; }
:where(select, input) { min-inline-size: 0; }
.item .actions { margin-block: 0; }
.actions { column-gap: 8px; row-gap: 8px; }
#tools select { width: 100%; }
nav button:focus-visible { outline-offset: -3px; }
.bars button:focus-visible { outline-offset: -2px; }
[dir="rtl"] .brand { direction: ltr; }
@media (max-width: 760px) {
  .shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px clamp(10px, 3vw, 20px) 28px;
  }
  nav {
    position: static;
    display: flex;
    gap: 3px;
    width: 100%;
    max-width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  nav button {
    flex: 1 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    min-width: 46px;
    padding: 6px;
    font-size: .75rem;
    line-height: 1.25;
    white-space: nowrap;
  }
  nav svg { width: 18px; height: 18px; }
  .row { align-items: center; }
  .item { flex-wrap: wrap; }
  .weekgrid { gap: 2px; }
  .weekgrid button { font-size: .75rem; }
  .two { gap: 8px; }
}
@media (max-width: 550px) {
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) 46px;
    gap: 8px;
    padding: 10px 14px;
    align-items: center;
  }
  #tools { display: contents; }
  #tools > label:nth-last-child(2) {
    grid-column: 2;
    grid-row: 1;
    max-width: 37vw;
  }
  #tools > .helpButton { grid-column: 3; grid-row: 1; }
  #tools > label:first-child:nth-last-child(3) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  #tools select { text-overflow: ellipsis; }
  .brand { font-size: clamp(20px, 6vw, 27px); gap: 6px; }
  .brand img { width: 29px; height: 29px; }
  .auth .actions > button, dialog .actions > button { flex: 1 1 auto; }
  .actions > button { min-height: 46px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0e23;
    --surface: #19192f;
    --ink: #f3f0ff;
    --muted: #c4c1d8;
    --line: #45435e;
    --accent: #c1b6ff;
    --on-accent: #24203e;
    --soft: #312d50;
    --focus: #a7e8ff;
    --danger: #ffa9b2;
    --wordmark: linear-gradient(105deg, #8ce0ff, #b5bfff 52%, #d6b0ff);
    color-scheme: dark;
  }
  .barSky { stop-color: #81d9f5; }
  .barBlue { stop-color: #889ff3; }
  .barIndigo { stop-color: #a486e4; }
  .bars [aria-current="date"] .barSky { stop-color: #a4eaff; }
  .bars [aria-current="date"] .barIndigo { stop-color: #be9eff; }
}
@media (forced-colors: active), print {
  h1 { background: none; color: CanvasText; }
}

@media (max-width: 550px) {
  .periodControl { width: 100%; }
}
@media (forced-colors: active) {
  .bars rect { fill: CanvasText; }
  .bars [aria-current="date"] rect { fill: Highlight; }
}

.scheduleHeader {
  margin-block-end: 18px;
  min-block-size: 50px;
}
.scheduleHeader h2 { margin: 0; }
.scheduleHeader .primary { padding-inline: 21px; flex-shrink: 0; }
.statsTools { display:flex; flex-wrap:wrap; gap:10px; align-items:center; max-inline-size:100%; }
.calendarTrigger { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.calendarTrigger svg { width:19px; height:19px; flex:none; }
.periodCaption { margin-block:18px 3px; color:var(--ink); font-weight:700; }
.emptyHistory { margin-block:18px; }
@media(max-width:600px) {
  .statsTools { flex:1 1 100%; }
  .statsTools .periodControl { flex:1 1 210px; }
}
@media print { .statsTools {display:none;} }

/* Company signature and product label share a fixed reading direction in all locales. */
.brand { gap: 12px; direction: ltr; }
.brand .brandLockup { width: 125px; height: auto; display: block; }
.brand .productName { color: #f6f4ff; font-size: 18px; font-weight: 400; letter-spacing: -.035em; }
header #tools select, header .helpButton {
  background-color: #202343; color: #f4f2ff; border-color: #555572;
}
header #tools select:focus-visible, header .helpButton:focus-visible { outline-color: #86dfff; }
header #tools label { color: #d7d6ee; }
.authHeading { display: flex; gap: 15px; align-items: center; margin-block-end: 24px; }
.authHeading img { border-radius: 15px; }
.authHeading h1 { font-size: clamp(25px, 3.2vw, 37px); margin: 0; }
.auth .actions { margin-block: 22px 0; }
@media (min-width: 860px) {
  .authLayout {
    display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
    max-width: 980px; margin: clamp(20px, 8vh, 96px) auto;
    border: 1px solid var(--line); border-radius: 23px; overflow: hidden; background: var(--surface);
  }
  .authLayout::before {
    content: ""; min-height: 330px;
    background: url("/omavu-ribbon.png") 50% 50% / 64% auto no-repeat,
      radial-gradient(ellipse at 0% 3%, #193c84, transparent 70%),
      linear-gradient(125deg, #101735, #070b22 52%, #372261);
  }
  .authLayout .auth { margin: 0; max-width: none; border: 0; border-radius: 0; padding: clamp(26px, 4vw, 48px); box-shadow: none; }
}
@media (max-width: 550px) {
  .brand { gap: 7px; }
  .brand .brandLockup { width: clamp(63px, 21vw, 98px); height: auto; }
  .brand .productName { font-size: clamp(13px, 3.6vw, 17px); }
  .authHeading { gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, select { transition: border-color .14s ease, box-shadow .14s ease; }
}
@media (forced-colors: active) {
  .brand .brandLockup { background: #10132e; forced-color-adjust: none; }
  .brand .productName, header #tools label { color: CanvasText; }
  button.active, .primary { border-color: Highlight; }
}

.profileButton { width:44px; height:44px; min-height:44px; border:1px solid #555572; border-radius:50%; padding:9px; color:#f5f3ff; background:#202343; }
.profileButton svg,.summaryCard svg { width:22px;height:22px;display:block; flex:none; }
.qrCamera { max-width:100%; max-height:50vh; display:block; margin-block:9px; }
.scopeSelect { margin-block:0 16px; max-width:360px; }
.homeSummaries { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-block-end:18px; }
.summaryCard { display:flex;align-items:center;text-align:start;gap:13px;background:var(--surface);padding:15px;min-height:65px;border-radius:16px; }
.summaryCard svg { color:var(--accent); }
.hero { background:linear-gradient(115deg,#1458c1 0%,#473ac5 53%,#7934bb 100%); }
.hero .metric { color:#fff;font-variant-numeric:tabular-nums; }
.hero .chip { background:#ffffff22;color:white; }
.hero .viewProgress { width:100%;height:7px;display:block;margin:14px 0 8px;border:0;border-radius:5px;overflow:hidden;accent-color:white;color:#fff;background:#ffffff44; }
.viewProgress::-webkit-progress-bar { background:#ffffff44; } .viewProgress::-webkit-progress-value { background:white;border-radius:5px; }
.viewProgress::-moz-progress-bar { background:white; }
.roleCard { max-width:750px;margin:clamp(18px,7vh,75px) auto; padding:clamp(24px,4vw,50px); }
.roleChoices { display:grid;grid-template-columns:1fr 1fr;gap:14px; }
.roleChoice { display:flex;align-items:center;text-align:start;gap:15px;padding:15px; }
.roleChoice img { width:53px;height:53px;object-fit:contain;flex:none; }
.roleChoice strong,.roleChoice small { display:block; }
.roleBack { border:0; background:none; color:var(--accent); margin-block:-12px 12px; min-height:38px; padding:4px; }
@media (max-width:760px) {
 .shell:has(nav:not(:empty)) { padding-bottom:calc(86px + env(safe-area-inset-bottom)); }
 nav:not(:empty) { position:fixed; z-index:3; inset-inline:0;top:auto;bottom:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));
   align-items:stretch;gap:2px;border:0;border-top:1px solid var(--line);border-radius:0;padding:4px 4px calc(5px + env(safe-area-inset-bottom)); }
 nav button { min-width:0;white-space:normal;overflow-wrap:anywhere;font-size:clamp(10px,2.7vw,12px);min-height:52px;padding:3px 2px; }
 .homeSummaries { grid-template-columns:1fr;gap:8px; }
 .roleChoices { grid-template-columns:1fr; }
 .scopeSelect { margin-block-end:12px;max-width:100%; }
}
@media (max-width:550px) {
 header { display:flex;justify-content:space-between;gap:8px;padding:8px 11px;min-height:64px; }
 #tools { display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:nowrap;min-width:0; }
 #tools > label { min-width:0; max-width:clamp(56px,21vw,99px); }
 #tools > label select {padding:4px; font-size:.8rem;}
 header .helpButton,.profileButton { width:44px;height:44px;flex:0 0 44px;min-height:44px; }
}
@media print { .scopeSelect,.roleBack { display:none; } }
