/* Copyright © 2026 Georgios Gertzikis. All rights reserved. */
:root {
  color-scheme: dark;
  --bg: #14213B;
  --surface: #1B2A45;
  --surface-raised: #263A59;
  --field: #172741;
  --line: #405675;
  --blue: #246BFF;
  --blue-led: #79AFFF;
  --blue-text: #B4D3FF;
  --fuchsia-led: #F34DC9;
  --yellow: #F5E642;
  --silver: #CBD6E8;
  --ink: #F0F5FF;
  --green: #A3EBDD;
  --red: #FFAAB7;
  --focus: #D6EEFF;
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 75rem 30rem at 15% 5rem, #2764B349, transparent 72%) no-repeat,
    radial-gradient(ellipse 54rem 46rem at 100% 29rem, #285CA42F, transparent 74%) no-repeat,
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button, select, input[type="color"], input[type="checkbox"] { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.035em; line-height: 1.2; }
h3 { font-size: 1.08rem; overflow-wrap: anywhere; }
a { color: var(--blue-text); }
.frame { width: min(1100px, 100%); padding-inline: clamp(12px, 3vw, 24px); margin-inline: auto; }
.masthead {
  border-bottom: 1px solid #415B82;
  background:
    radial-gradient(ellipse at 22% 0%, #3055887D, transparent 65%),
    linear-gradient(110deg, #15243F, #1A2B4B 72%, #202940);
}
.masthead::after {
  content: '';
  display: block;
  height: 2px;
  width: min(100% - clamp(24px, 6vw, 48px), 1052px);
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--blue-led) 10%, #578EF6 37%,
    var(--fuchsia-led) 64%, var(--yellow) 91%, transparent);
  filter: drop-shadow(0 0 5px #5394FFC2);
}
.masthead-inner { padding-block: 22px 19px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.brand img { border-radius: 12px; border: 1px solid #587DB1; box-shadow: 0 0 12px #4E91FF32; }
.brand-lockup {
  --wordmark-size: clamp(2.35rem, 5vw, 3.1rem);
  --brand-columns: minmax(calc(var(--wordmark-size) * 2.2), max-content) max-content;
  display: grid;
  grid-template-columns: var(--brand-columns);
  column-gap: .35rem;
}
.wordmark, .tagline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--brand-columns);
  column-gap: inherit;
}
@supports (grid-template-columns: subgrid) {
  .wordmark, .tagline { grid-template-columns: subgrid; }
}
.wordmark { font-size: var(--wordmark-size); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.wordmark span:first-child { justify-self: end; }
.wordmark span:last-child { color: var(--blue-text); text-shadow: 0 0 13px #6BA8FF4D; }
.tagline {
  padding-block-start: 6px;
  font-size: clamp(.57rem, 1.25vw, .69rem);
  font-weight: 700;
  letter-spacing: .025em;
  color: var(--silver);
  white-space: nowrap;
}
.tagline span:last-child { color: var(--blue-text); }
.masthead-tools { display: grid; justify-items: end; align-content: space-between; min-width: 0; gap: 8px; }
.language select { min-height: 36px; padding-block: 4px; }
.signature { display: flex; align-items: center; justify-content: end; gap: 7px; color: var(--silver); font-size: .72rem; white-space: nowrap; }
.signature img { width: 175px; max-width: 100%; height: auto; }
nav {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, #1C3050, #182742);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 16px #09142752;
}
.nav-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
nav button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 7px 4px; border: 1px solid transparent; border-bottom-width: 2px; background: transparent; color: var(--silver); font-weight: 650; }
nav button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }
nav button:hover { background: #31507B65; color: var(--ink); }
nav button[aria-current="page"] {
  background: radial-gradient(ellipse 90% 90% at 50% 100%, #386AB77A, transparent), #243B5D;
  color: var(--ink);
  border-inline-color: #405D86;
  border-bottom-color: var(--blue-led);
}
nav button[aria-current="page"]::after {
  content: '';
  position: absolute;
  inset: auto 12% -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #DAEDFF, transparent);
  filter: drop-shadow(0 0 4px var(--blue-led));
  pointer-events: none;
}
nav button[aria-current="page"] svg { color: var(--blue-text); filter: drop-shadow(0 0 5px #629FFF87); }
nav button:focus-visible { z-index: 1; outline-offset: -4px; }
main { padding-block: 25px 28px; }
.heading, .section-head, .actions, .spread-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.heading { margin-bottom: 18px; }
.heading p, .section-head p { margin-top: 5px; }
.section-head { margin-bottom: 11px; }
.muted { color: var(--silver); font-size: .88rem; overflow-wrap: anywhere; }
.actions { justify-content: flex-start; }
.card {
  background: linear-gradient(145deg, #223654, var(--surface) 76%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(13px, 3vw, 20px);
  margin-bottom: 15px;
  box-shadow: inset 0 1px #C4D9FF0D, 0 7px 20px #0A142A55;
  min-width: 0;
}
.card > p + p, .card > p + .actions, .card > .actions + p { margin-top: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 218px), 1fr)); gap: 13px; margin-bottom: 15px; }
.category-accent { --category-light: var(--ink); }
.category-counter { font-weight: 720; font-variant-numeric: tabular-nums; }
.category-counter, .category-label { color: var(--category-light, var(--ink)); }
.kpi {
  position: relative;
  margin-bottom: 0;
  border-top-color: var(--category);
}
.kpi::before, .smart-hint::before {
  content: '';
  position: absolute;
  inset: -1px 12px auto;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
}
.kpi::before {
  background: linear-gradient(90deg, transparent, var(--category) 18%, var(--category-light) 50%, var(--category) 82%, transparent);
  filter: drop-shadow(0 0 5px var(--category));
}
.kpi strong { display: block; margin-top: 7px; font-size: clamp(2.15rem, 5vw, 2.75rem); line-height: 1.14; }
.kpi .spread-line { margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-raised); color: var(--ink); border-radius: 7px; padding: 4px 8px; font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.badge.category-badge { color: var(--category-light); }
.swatch { display: inline-block; width: .68em; height: .68em; background: var(--category); border-radius: 50%; flex: none; }
@supports (color: color-mix(in srgb, red, white)) {
  .category-accent { --category-light: color-mix(in srgb, var(--category, var(--blue-led)) 28%, #F6F8FF); }
  .kpi {
    background: linear-gradient(140deg, color-mix(in srgb, var(--category) 17%, #213250), var(--surface) 85%);
    border-color: color-mix(in srgb, var(--category) 27%, #526782);
    box-shadow: inset 0 1px #E1E6FF13, 0 7px 20px #0A142A66, 0 0 18px color-mix(in srgb, var(--category) 18%, transparent);
  }
  .kpi strong { text-shadow: 0 0 13px color-mix(in srgb, var(--category) 38%, transparent); }
  .badge.category-badge { background: color-mix(in srgb, var(--category) 11%, #233554); }
  .swatch {
    background: color-mix(in srgb, var(--category) 72%, #D6E6FF);
    border: 1px solid color-mix(in srgb, var(--category) 48%, #F2F8FF);
    box-shadow: 0 0 6px color-mix(in srgb, var(--category) 66%, transparent);
  }
}
@supports (color: oklch(from red l c h)) {
  /* Lift dark custom colors for text while preserving their hue. */
  .category-accent { --category-light: oklch(from var(--category, var(--blue-led)) max(l, .82) min(c, .16) h); }
}
.ok { background: #172F3B; color: var(--green); }
.warn { background: #35321B; color: var(--yellow); }
.bad { background: #3C202D; color: var(--red); }
.notice { padding: 11px 13px; border-radius: 10px; background: var(--surface-raised); margin-block: 10px; overflow-wrap: anywhere; }
.notice.ok { background: #172F3B; }
.notice.warn { background: #35321B; }
.notice.bad { background: #3C202D; }
.notice .btn { margin-top: 8px; display: flex; width: fit-content; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #667EA1; border-radius: 9px; background: var(--surface-raised); color: var(--ink); padding: 8px 12px; font-weight: 650; text-align: center; }
.btn.primary {
  background: linear-gradient(155deg, #2B5AB0, #224894);
  border-color: #79A9F7;
  color: white;
  box-shadow: inset 0 1px #D2E8FF26, 0 0 10px #3B80FF33;
}
.btn.danger { color: var(--red); border-color: #773D58; }
.btn:hover:enabled { filter: brightness(1.14); }
.btn.compact { font-size: .87rem; padding-inline: 9px; }
.field { display: grid; align-content: start; gap: 5px; color: var(--silver); font-size: .9rem; font-weight: 650; min-width: 0; }
.fields, .options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; align-items: end; }
.fields + .fields, .fields + p, .fields + .actions, .field + .field, .options-grid + p { margin-top: 10px; }
.fields > .field + .field, .options-grid > .field + .field { margin-top: 0; }
input:not([type="checkbox"]), select, textarea { color: var(--ink); border: 1px solid #657FA4; background: var(--field); border-radius: 8px; padding: 8px 9px; min-height: 44px; width: 100%; min-width: 0; }
input[type="color"] { padding: 5px; }
input[type="checkbox"] { width: 19px; height: 19px; margin: 0; accent-color: var(--blue); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; overflow-wrap: anywhere; }
.table-wrap { position: relative; overflow-x: auto; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: start; font-variant-numeric: tabular-nums; }
th, td { text-align: start; padding: 10px 9px; border-bottom: 1px solid var(--line); min-width: 100px; overflow-wrap: anywhere; }
th { color: var(--silver); font-size: .86rem; background: var(--surface-raised); }
th:first-child { min-width: 126px; }
td strong { font-size: 1.05rem; }
td small, th small { display: block; color: var(--silver); white-space: nowrap; }
td small.category-label { color: var(--category-light); }
.rows { display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.row > div:first-child { flex: 1 1 170px; min-width: 0; overflow-wrap: anywhere; }
.row .badge { margin-inline-start: 6px; }
.row .badge:first-child { margin-inline-start: 0; }
.row p { margin-top: 4px; }
.calendar-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: start; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-tools { justify-content: space-between; flex-wrap: nowrap; }
.month { text-transform: capitalize; text-align: center; }
.weekday { font-size: .74rem; color: var(--silver); text-align: center; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; gap: 4px; background: var(--surface-raised); border: 1px solid transparent; border-radius: 8px; color: var(--ink); }
.day.today { border-color: #5D77A6; }
.day[aria-pressed="true"] { background: #2A4C81; border-color: var(--blue-led); box-shadow: inset 0 0 9px #649EFF3D; }
.dots { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 5px; }
.dots .swatch { display: inline-block; width: 5px; height: 5px; }
.category-row { border-inline-start: 3px solid var(--category); }
@supports (color: color-mix(in srgb, red, white)) {
  .category-row {
    background: linear-gradient(100deg, color-mix(in srgb, var(--category) 12%, #21324F), #20314C 68%);
    border-inline-start-color: var(--category-light);
    box-shadow: inset 4px 0 10px -8px var(--category);
  }
}
.smart-hint {
  position: relative;
  border-color: #6978AC;
  background:
    radial-gradient(ellipse 85% 120% at 0% 0%, #315A9A59, transparent 70%),
    radial-gradient(ellipse 65% 110% at 100% 0%, #A04C9939, transparent 78%),
    var(--surface);
  box-shadow: inset 0 1px #CDDEFF22, 0 0 20px #3D86FF2C, 3px 0 19px #D14DA329;
}
.smart-hint::before {
  background: linear-gradient(90deg, transparent, #9DC5FF 15%, #8297EF 49%, #EE82CF 85%, transparent);
  box-shadow: -6px 0 8px #579DFF64, 6px 0 8px #DB5EB658;
}
.smart-hint h3 { color: #DCE9FF; }
.smart-hint .hint-list li::marker { color: var(--blue-text); }
.empty { padding-block: 10px; color: var(--silver); }
.wizard { max-width: 780px; margin-inline: auto; }
.wizard .progress { color: var(--blue-text); font-size: .8rem; font-weight: 700; }
.wizard > .actions { justify-content: space-between; }
.confirm-bar { margin-top: 14px; }
.hint-list { padding-inline-start: 22px; }
.hint-list li { margin-bottom: 6px; overflow-wrap: anywhere; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; padding-top: 13px; margin-top: 16px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--silver); }
.toast { position: fixed; z-index: 5; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 11px 14px; border: 1px solid #4E6794; background: #172A4F; border-radius: 10px; box-shadow: 0 5px 20px #0008; }
dialog { width: min(94%, 580px); max-height: 88dvh; overflow: auto; border: 1px solid #617AA0; border-radius: 15px; background: var(--surface); color: var(--ink); padding: 19px; }
dialog::backdrop { background: #000A; }
dialog h2 { margin-bottom: 12px; }
dialog form > .field, dialog form > .actions, dialog form > p { margin-top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) {
  .masthead-inner { padding-block: 14px; }
  .masthead-tools { align-content: center; }
  .signature { gap: 4px; }
  .signature img { width: clamp(80px, 22vw, 156px); }
  .brand img { width: 42px; height: 42px; }
  nav button { flex-direction: column; gap: 3px; font-size: .74rem; line-height: 1.15; }
  .calendar-layout { grid-template-columns: 1fr; gap: 0; }
  .recipient-table { table-layout: fixed; }
  .recipient-table th, .recipient-table td { min-width: 0; padding-inline: 5px; }
  .recipient-table th:first-child { width: 34%; }
  .recipient-table th small { white-space: normal; }
  .recipient-table .check { justify-content: center; }
  main { padding-block: 18px 24px; }
}

@media (max-width: 420px) {
  .masthead-inner { flex-wrap: wrap; gap: 7px 12px; }
  .masthead-tools { display: contents; }
  .brand { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .signature { flex-basis: 100%; }
  .signature img { width: clamp(115px, 34vw, 142px); }
}

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  nav button[aria-current="page"] { color: Highlight; border-bottom-color: Highlight; }
  .kpi, .category-row, .smart-hint { border-color: CanvasText; }
  .swatch { border: 1px solid CanvasText; }
}

@media print {
  :root { color-scheme: light; }
  body { background: white; color: #101829; }
  body > :not(#printReport) { display: none !important; }
  #printReport { padding: 7mm; overflow-wrap: anywhere; }
  #printReport h1, #printReport h2, #printReport p { margin-bottom: 7px; }
  #printReport table { table-layout: fixed; margin-block: 10px; }
  #printReport th, #printReport td { background: white; color: #101829; min-width: 0; border-color: #ABB4C2; hyphens: auto; }
  #printReport th { background: #EFF2F8; }
  #printReport tr { break-inside: avoid; }
  #printReport thead { display: table-header-group; }
  @page { margin: 9mm; }
}
