/* Next Level English dashboard - one stylesheet.
   Status colors live here only (never in the database). */
:root {
  --navy-950: #061429;
  --navy-900: #0a1f3f;
  --navy-800: #0f2d5c;
  --blue: #2f6bff;
  --blue-soft: #e8efff;
  --orange: #ff7a1a;
  --orange-2: #ff9a3d;
  --orange-dark: #e8650a;
  --ink: #14202f;
  --muted: #6a778a;
  --line: #e6ebf3;
  --bg: #f4f6fb;
  --card: #ffffff;
  --c-upcoming: #2f6bff;
  --c-pending: #e5484d;
  --c-completed: #12a150;
  --c-absent: #8793a6;
  --c-cancelled: #8793a6;
  --radius: 22px;
  --shadow-sm: 0 1px 2px rgba(10, 31, 63, .05), 0 2px 8px rgba(10, 31, 63, .04);
  --shadow: 0 1px 2px rgba(10, 31, 63, .04), 0 8px 28px rgba(10, 31, 63, .07);
  --shadow-lg: 0 20px 50px rgba(10, 31, 63, .16);
  --sidebar-w: 264px;
  --axis: 64px;
  --ppm: 1px; /* calendar scale: pixels per minute */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --grad-orange: linear-gradient(135deg, var(--orange-2), var(--orange-dark));
  --grad-navy: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  --grad-blue: linear-gradient(135deg, #5b8dff, #2556e8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-family: var(--font-display); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.icon { flex: none; }
img { max-width: 100%; }

/* ---------- Animated background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 24s ease-in-out infinite alternate; will-change: transform; }
.bg i:nth-child(1) { width: 560px; height: 560px; background: #8fb0ff; top: -200px; left: 10%; }
.bg i:nth-child(2) { width: 480px; height: 480px; background: #ffc59a; bottom: -200px; right: -80px; animation-duration: 30s; animation-delay: -6s; }
.bg i:nth-child(3) { width: 360px; height: 360px; background: #c9b8ff; top: 38%; left: 58%; opacity: .32; animation-duration: 36s; animation-delay: -12s; }
.bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(10, 31, 63, .06) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(70px, 50px) scale(1.18); } }

/* ---------- Layout ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40; color: #fff;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  display: flex; flex-direction: column; padding: 22px 16px; overflow: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sidebar::before, .sidebar::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.sidebar::before { width: 240px; height: 240px; background: rgba(47, 107, 255, .35); top: -90px; right: -110px; animation: drift 18s ease-in-out infinite alternate; }
.sidebar::after { width: 260px; height: 260px; background: rgba(255, 122, 26, .28); bottom: -110px; left: -120px; animation: drift 22s ease-in-out infinite alternate-reverse; }
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; padding: 6px 8px 26px; }
.brand__logo { width: 100%; max-width: 188px; height: auto; display: block; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.sidebar__nav { display: flex; flex-direction: column; gap: 6px; }
.navlink {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  font-weight: 600; color: rgba(255, 255, 255, .72); transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.navlink:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: translateX(3px); }
.navlink.is-active { background: var(--grad-orange); color: #fff; box-shadow: 0 8px 22px rgba(255, 122, 26, .4); }
.sidebar__user {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; backdrop-filter: blur(8px);
}
.sidebar__who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar__who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.sidebar__who small { color: rgba(255, 255, 255, .6); }
.sidebar__user form { margin: 0; }

.main { margin-left: var(--sidebar-w); padding: 18px 40px 56px; min-height: 100vh; }
.container { max-width: 1240px; margin: 0 auto; animation: pageIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.bottomnav, .drawer-backdrop, .fab { display: none; }
/* Top bar: on desktop it only holds the three buttons (the sidebar has logo and logout). */
.topbar { display: flex; align-items: center; gap: 10px; margin-left: var(--sidebar-w); padding: 22px 40px 0; }
.topbar .brand--small, .topbar > form, .topbar [data-drawer] { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 14px; transition: color .15s, transform .15s; }
.back-link:hover { color: var(--ink); transform: translateX(-3px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px;
  border: 0; border-radius: 14px; cursor: pointer; font-weight: 700; letter-spacing: .3px; color: #fff; background: var(--grad-navy);
  box-shadow: 0 6px 16px rgba(10, 31, 63, .22); transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10, 31, 63, .28); filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn--orange { background: var(--grad-orange); box-shadow: 0 8px 22px rgba(255, 122, 26, .38); }
.btn--orange:hover { box-shadow: 0 12px 28px rgba(255, 122, 26, .5); }
.btn--ghost { background: rgba(255, 255, 255, .85); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); }
.btn--ghost:hover { box-shadow: var(--shadow); border-color: #cdd6e4; filter: none; }
.btn--danger { background: linear-gradient(135deg, #ff6b6b, #d92d3a); box-shadow: 0 8px 20px rgba(217, 45, 58, .32); }
.btn--lg { min-height: 54px; font-size: 16px; padding: 0 28px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .45; cursor: not-allowed; pointer-events: none; transform: none; box-shadow: none; }
.btn--choice { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn--choice:hover { box-shadow: var(--shadow-sm); }
.btn--choice.is-on.is-present { background: var(--c-completed); border-color: var(--c-completed); color: #fff; }
.btn--choice.is-on.is-absent { background: var(--c-absent); border-color: var(--c-absent); color: #fff; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer; display: inline-grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: #fff; transition: background .15s, transform .15s;
}
.iconbtn:hover { background: rgba(255, 255, 255, .22); }
.iconbtn:active { transform: scale(.92); }
.iconbtn--light { background: transparent; }

/* ---------- Cards, stats, rows ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
  border: 1px solid rgba(10, 31, 63, .05);
}
.card + .card, .section { margin-top: 24px; }
.section-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 1.4px; color: var(--muted); margin: 36px 0 14px; text-transform: uppercase; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.stat {
  position: relative; overflow: hidden; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 6px; border: 1px solid rgba(10, 31, 63, .05);
  transition: transform .2s ease, box-shadow .2s ease;
  --tone: var(--navy-800); --tone-soft: #e7ecf5;
}
.stat::after {
  content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -50px; top: -60px;
  background: var(--tone); opacity: .08; transition: transform .4s ease;
}
a.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
a.stat:hover::after { transform: scale(1.4); }
.stat__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); margin-bottom: 8px; }
.stat__label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); }
.stat__value { font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; }
.stat.blue { --tone: var(--c-upcoming); --tone-soft: var(--blue-soft); }
.stat.red { --tone: var(--c-pending); --tone-soft: #fde8e9; }
.stat.green { --tone: var(--c-completed); --tone-soft: #dff5e8; }
.stat.orange { --tone: var(--orange-dark); --tone-soft: #ffeedd; }
.stat.small .stat__value { font-size: 27px; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--card);
  border-radius: 18px; box-shadow: var(--shadow-sm); padding: 16px 20px; border: 1px solid rgba(10, 31, 63, .05);
  border-left: 6px solid var(--line); transition: transform .2s ease, box-shadow .2s ease;
}
a.row:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.row__main { display: flex; flex-direction: column; min-width: 0; }
.row__main b { font-size: 17px; }
.row__main small { color: var(--muted); font-size: 14px; }
.row--person { border-left-width: 1px; }
.row--person .row__main { flex: 1; }
.row__extra { color: var(--muted); font-size: 14px; white-space: nowrap; }
.empty { color: var(--muted); font-weight: 600; text-align: center; padding: 30px 12px; margin: 0; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--grad-blue); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 19px;
  box-shadow: 0 6px 14px rgba(47, 107, 255, .3);
}
.row .avatar { margin-right: 14px; }

/* ---------- Status colors ---------- */
.pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .8px; white-space: nowrap; color: #fff; background: var(--c-upcoming);
}
.pill.st-upcoming { background: var(--c-upcoming); }
.pill.st-pending { background: var(--c-pending); }
.pill.st-completed { background: var(--c-completed); }
.pill.st-absent, .pill.st-cancelled { background: var(--c-absent); }
.pill.on { background: var(--c-completed); }
.pill.off { background: var(--c-absent); }
.row.st-upcoming { border-left-color: var(--c-upcoming); }
.row.st-pending { border-left-color: var(--c-pending); }
.row.st-completed { border-left-color: var(--c-completed); }
.row.st-absent, .row.st-cancelled { border-left-color: var(--c-absent); background: #eef1f6; }

/* ---------- Calendar (Google Calendar style) ---------- */
.cal-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-bar .btn { min-height: 44px; padding: 0 16px; }
.cal-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin: 0 8px; }
.cal-title small { color: var(--muted); font-size: 16px; font-weight: 500; margin-left: 6px; }
.cal-legend { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.gcal { background: rgba(255, 255, 255, .92); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(10, 31, 63, .06); overflow: hidden; backdrop-filter: blur(8px); }
.gcal__scroll { max-height: calc(100vh - 235px); overflow-y: auto; position: relative; scroll-behavior: smooth; overscroll-behavior: contain; }
.gcal__head {
  position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: var(--axis) repeat(7, minmax(0, 1fr));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.gcal__dayhead {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 12px; border: 0; background: none;
  border-left: 1px solid var(--line); cursor: default; min-width: 0;
}
.gcal__dayhead span { font-size: 11px; letter-spacing: 1.2px; font-weight: 700; color: var(--muted); }
.gcal__dayhead b {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 600; transition: background .2s, color .2s, transform .2s;
}
.gcal__dayhead.is-today span { color: var(--orange-dark); }
.gcal__dayhead.is-today b { background: var(--grad-orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 26, .4); }
.gcal__body { position: relative; display: grid; grid-template-columns: var(--axis) repeat(7, minmax(0, 1fr)); }
.gcal__axis { position: relative; }
.gcal__hour { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.gcal__col {
  position: relative; border-left: 1px solid var(--line);
  background-image:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, transparent calc(50% - 1px), rgba(230, 235, 243, .55) calc(50% - 1px), rgba(230, 235, 243, .55) 50%, transparent 50%);
  background-size: 100% calc(60 * var(--ppm)), 100% calc(60 * var(--ppm));
}
.gcal__col.is-today { background-color: rgba(47, 107, 255, .035); }
[data-manage] .gcal__col { cursor: cell; }
.nowline { position: absolute; left: 0; right: 0; height: 2px; background: #ea4335; z-index: 4; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ea4335; }

.event {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 6px 9px; border: 0; border-radius: 12px;
  top: calc(var(--t) * var(--ppm)); height: max(28px, calc(var(--d) * var(--ppm) - 2px));
  color: #fff; text-align: left; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.25;
  border-left: 4px solid rgba(255, 255, 255, .55); box-shadow: 0 4px 12px rgba(10, 31, 63, .18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; animation: eventIn .4s ease both;
}
.event:hover { transform: translateY(-2px) scale(1.015); z-index: 5; box-shadow: 0 12px 26px rgba(10, 31, 63, .28); filter: brightness(1.05); }
.event__title { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event__time { opacity: .92; font-weight: 600; white-space: nowrap; }
.event__sub { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event--short { flex-direction: row; align-items: center; gap: 8px; padding-top: 3px; padding-bottom: 3px; }
.event--short .event__sub { display: none; }
.event.st-upcoming { background: linear-gradient(135deg, #5b8dff, #2556e8); }
.event.st-pending { background: linear-gradient(135deg, #ff7a7a, #dc3545); }
.event.st-completed { background: linear-gradient(135deg, #2fd085, #0f9d58); }
.event.st-absent { background: linear-gradient(135deg, #a3aebf, #7b879a); }
.event.st-cancelled {
  background: repeating-linear-gradient(45deg, #c8cfda, #c8cfda 8px, #d4dae3 8px, #d4dae3 16px);
  color: #4f5b6e; box-shadow: none; border-left-color: #9aa5b6;
}
.event.st-cancelled .event__title { text-decoration: line-through; }
@keyframes eventIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.fab {
  position: fixed; right: 18px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 62px; height: 62px;
  border-radius: 50%; border: 0; place-items: center; color: #fff; background: var(--grad-orange); cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 122, 26, .5); transition: transform .15s;
}
.fab:active { transform: scale(.92); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 700; letter-spacing: 1.1px; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number],
.field input[type=date], .field input[type=time], .field input[type=url], .field select, .field textarea, input[type=file] {
  width: 100%; min-height: 52px; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 255, .14); }
.field input:disabled, .field select:disabled, .field textarea:disabled { background: #f2f4f8; color: #9aa5b6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row--3 { grid-template-columns: 96px 1.35fr 1fr; }
.pw-view { position: relative; display: flex; align-items: center; }
.pw-view input { padding-right: 108px !important; font-weight: 600; background: #f8fafd !important; }
.pw-view--empty input { padding-right: 15px !important; color: var(--muted); font-weight: 500; }
.pw-btn {
  position: absolute; right: 7px; top: 7px; bottom: 7px; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 12px; font-weight: 800;
  letter-spacing: .6px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s;
}
.pw-btn:hover { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.pw-btn .ic-show, .pw-btn .ic-hide { display: inline-flex; align-items: center; }
.pw-view .ic-hide { display: none; }
.pw-view.is-shown .ic-show { display: none; }
.pw-view.is-shown .ic-hide { display: inline-flex; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; }
.mode span {
  display: block; text-align: center; padding: 16px; border: 2px solid var(--line); border-radius: 16px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .6px; background: #fff; transition: all .18s;
}
.mode input:checked + span { border-color: var(--orange); background: #fff5ec; color: var(--orange-dark); box-shadow: 0 6px 16px rgba(255, 122, 26, .18); }
.mode input:focus-visible + span { box-shadow: 0 0 0 4px rgba(255, 122, 26, .25); }

/* One row per weekday: tick the day, pick its own time */
.daytimes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.daytime {
  display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 12px; padding: 8px 8px 8px 14px;
  border: 2px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s;
}
.daytime.is-on { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 4px 14px rgba(47, 107, 255, .12); }
.daytime label { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; min-height: 40px; }
.daytime input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--blue); flex: none; }
.daytime input[type=time] { min-height: 44px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.daytime input[type=time]:disabled { opacity: .4; }

.checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.checks label { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg); border-radius: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.checks label:hover { background: #e9edf5; }
.checks input, .scope input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.scope { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; display: flex; flex-direction: column; gap: 4px; background: #fff; }
.scope legend { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--muted); padding: 0 6px; }
.scope label { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-weight: 600; }
.errors { background: #fdecec; border: 1.5px solid #f6b9bb; color: #9b1c20; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.errors p { margin: 4px 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.flash {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; margin-bottom: 20px; font-weight: 600;
  box-shadow: var(--shadow-sm); animation: slideIn .35s ease;
}
.flash--success { background: #e3f6ec; color: #0b6a36; }
.flash--success .icon { animation: pop .45s ease; }
.flash--error { background: #fdecec; color: #9b1c20; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tab { padding: 12px 20px; border-radius: 999px; background: rgba(255, 255, 255, .85); font-weight: 700; border: 1.5px solid var(--line); transition: all .18s; }
.tab:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.tab small { margin-left: 6px; opacity: .6; }
.tab.is-active { background: var(--grad-navy); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(10, 31, 63, .25); }

/* ---------- Homework ---------- */
.hw { display: flex; flex-direction: column; gap: 14px; }
.hw__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.hw__top h3 { font-size: 21px; }
.hw__top small { color: var(--muted); }
.hw__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hw form.upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hw form.upload input[type=file] { flex: 1; min-width: 220px; }
.done { display: inline-flex; align-items: center; gap: 8px; color: var(--c-completed); font-weight: 700; }
.note { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.note b { display: block; font-size: 12px; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }
.note p { margin: 0; white-space: pre-wrap; }

/* ---------- Session modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 20, 41, .55); backdrop-filter: blur(6px); animation: fade .25s ease; }
.modal__panel {
  position: relative; width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; background: #fff;
  border-radius: 28px; padding: 28px; animation: rise .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 40px 90px rgba(0, 0, 0, .35);
}
.modal__panel--wide { max-width: 680px; }
.modal__close {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--bg); font-weight: 700; margin-bottom: 14px; transition: background .15s, transform .15s;
}
.modal__close:hover { background: #e6eaf2; }
.modal__close:active { transform: scale(.95); }
.modal h2 { font-size: 28px; font-weight: 700; margin-bottom: 18px; letter-spacing: -.5px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.sv__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sv__head h2 { margin: 0; }
.sv__info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0 0 20px; }
.sv__info div { min-width: 0; }
.sv__info dt { font-size: 12px; font-weight: 700; letter-spacing: 1.1px; color: var(--muted); }
.sv__info dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.sv__info .wide { grid-column: 1 / -1; }
.sv h3 { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); margin: 24px 0 10px; text-transform: uppercase; }
.sv__block { border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 12px; background: #fff; }
.sv__block h4 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sv__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.sv__panel { border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 14px; background: #f9fafc; animation: rise .25s ease; }
.sv__panel > p { font-weight: 700; margin: 0 0 12px; }
.sv__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.notice { background: var(--blue-soft); color: #1f3f99; border-radius: 14px; padding: 12px 16px; font-weight: 600; margin: 0 0 14px; }
.todo { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #fdecec; color: #9b1c20; font-weight: 600; }

/* ---------- Login / setup ---------- */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden;
  background: radial-gradient(1100px 600px at 15% 0%, var(--navy-800), var(--navy-950));
}
.auth-body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px); background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
}
.auth-body .bg { z-index: 0; }
.auth-body .bg::after { display: none; }
.auth-body .bg i { opacity: .55; }
.auth-body .bg i:nth-child(1) { background: #2f6bff; left: -80px; top: -120px; }
.auth-body .bg i:nth-child(2) { background: #ff7a1a; right: -100px; bottom: -140px; opacity: .45; }
.auth-body .bg i:nth-child(3) { background: #7a5cff; opacity: .3; }
.auth-card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; background: rgba(255, 255, 255, .97); border-radius: 30px;
  padding: 36px 34px 32px; box-shadow: 0 40px 100px rgba(0, 0, 0, .45); animation: rise .5s cubic-bezier(.2, .8, .2, 1);
}
.auth-logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 0 auto 22px; animation: logoIn .7s cubic-bezier(.2, .8, .2, 1) both .1s; }
@keyframes logoIn { from { opacity: 0; transform: translateY(-10px) scale(.92); } to { opacity: 1; transform: none; } }
.auth-card h1 { font-size: 30px; font-weight: 700; margin-bottom: 6px; text-align: center; letter-spacing: -.6px; }
.auth-card p.muted { margin: 0 0 24px; text-align: center; }
.auth-card .small-link { display: block; text-align: center; margin-top: 18px; color: var(--muted); font-weight: 600; transition: color .15s; }
.auth-card .small-link:hover { color: var(--ink); }

/* ---------- Detail pages ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card h2 { font-size: 21px; font-weight: 700; margin-bottom: 16px; }

/* ---------- Tablet / phone ---------- */
@media (max-width: 900px) {
  :root { --axis: 46px; --ppm: 1.8px; }
  .sidebar { transform: translateX(-100%); }
  body.drawer-open .sidebar { transform: none; box-shadow: 0 0 80px rgba(0, 0, 0, .5); }
  body.drawer-open .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(6, 20, 41, .5); backdrop-filter: blur(4px); z-index: 35; }
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 12px;
    background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); color: #fff; justify-content: space-between;
    box-shadow: 0 6px 20px rgba(6, 20, 41, .25);
  }
  .topbar .brand--small { padding: 0; margin-right: auto; }
  .topbar .brand__logo { height: 40px; width: auto; max-width: none; filter: none; }
  .topbar form { margin: 0; }
  .main { margin-left: 0; padding: 20px 16px 44px; min-height: calc(100vh - 64px); }
  body.has-bottomnav .main { padding-bottom: 110px; }
  body.has-bottomnav .sidebar, body.has-bottomnav .drawer-backdrop { display: none !important; }
  .bottomnav {
    display: flex; position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30;
    height: 70px; padding: 6px; border-radius: 24px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(16px);
    border: 1px solid rgba(10, 31, 63, .06); box-shadow: 0 16px 40px rgba(10, 31, 63, .2);
  }
  .bottomnav__link {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px;
    font-size: 12px; font-weight: 700; color: var(--muted); transition: all .2s;
  }
  .bottomnav__link.is-active { background: var(--grad-orange); color: #fff; box-shadow: 0 8px 18px rgba(255, 122, 26, .4); }
  .fab { display: grid; }
  .page-head h1 { font-size: 28px; }
  .page-head .add-desktop { display: none; }
  .two-col { grid-template-columns: 1fr; }

  /* Calendar on phones: day chips on top, one day shown at a time */
  .cal-legend { display: none; }
  .gcal__scroll { max-height: calc(100vh - 290px); }
  .gcal__head { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .gcal__corner { display: none; }
  .gcal__dayhead { cursor: pointer; border-left: 0; padding: 10px 2px; }
  .gcal__dayhead b { width: 38px; height: 38px; font-size: 18px; }
  .gcal__dayhead.is-sel b { background: var(--grad-navy); color: #fff; }
  .gcal__dayhead.is-today.is-sel b { background: var(--grad-orange); }
  .gcal__body { grid-template-columns: var(--axis) minmax(0, 1fr); }
  .gcal__col:not(.is-sel) { display: none; }
  .gcal__col { border-left: 1px solid var(--line); }
  .event { font-size: 13px; padding: 8px 12px; }
  .event__title { font-size: 15px; }
}
@media (max-width: 640px) {
  .field-row, .field-row--3, .sv__info, .sv__choices { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat__value { font-size: 30px; }
  .stat__icon { width: 40px; height: 40px; }
  .card { padding: 18px; }
  .cal-title { font-size: 21px; margin: 0; flex: 1; }
  .cal-title small { display: block; margin: 0; font-size: 13px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal__panel { max-width: none; max-height: 96vh; min-height: 70vh; border-radius: 28px 28px 0 0; padding: 20px 18px 30px; }
  .row { padding: 14px; }
  .btn--lg { width: 100%; }
  .form-actions .btn, .sv__actions .btn { flex: 1; }
  .hw form.upload .btn { width: 100%; }
  .auth-card { padding: 30px 22px 26px; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .daytime { grid-template-columns: 1fr 112px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Top bar buttons: notifications / language / contact ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; }
.tbtn {
  position: relative; height: 42px; min-width: 42px; padding: 0 10px; border-radius: 13px; border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, .92); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; font-weight: 800; font-size: 13px; letter-spacing: .6px; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.tbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tbtn:active { transform: scale(.94); }
.tbtn.is-active { background: var(--grad-orange); color: #fff; border-color: transparent; }
.tbtn__badge {
  position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center;
  background: #e5252f; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; border: 2px solid #fff; letter-spacing: 0;
  box-shadow: 0 4px 10px rgba(229, 37, 47, .45); animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }
.toolbar .lang-switcher-wrap { display: inline-flex; }
.toolbar .lang-menu { left: 0; right: auto; transform: translateY(-6px); }
.toolbar .lang-menu.is-open { transform: none; }
.navlink__badge {
  margin-left: auto; font-style: normal; background: #e5252f; color: #fff; border-radius: 999px; min-width: 24px; padding: 2px 8px;
  font-size: 12px; font-weight: 800; text-align: center;
}

/* ---------- Contact popup ---------- */
.modal__panel--narrow { max-width: 440px; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--line);
  background: #fff; text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.contact-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cdd6e4; }
.contact-row:active { transform: scale(.98); }
.contact-row__icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; flex: none; background: #f1f4fa; }
.contact-row__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-row__icon--mail { background: var(--grad-orange); color: #fff; }
.contact-row__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.contact-row__txt b { font-size: 17px; }
.contact-row__txt small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.contact-row__hint { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }

/* ---------- Notifications page ---------- */
.notif { gap: 14px; }
.notif .row__main { flex: 1; }
.notif__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #fde8e9; color: var(--c-pending); flex: none; }
.notif__go { color: var(--muted); display: grid; place-items: center; }
.notif-count { font-size: 14px; padding: 7px 16px; }
.notif-empty { text-align: center; padding: 48px 20px; }
.notif-empty__icon { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: #dff5e8; color: var(--c-completed); }
.notif-empty h2 { margin-bottom: 6px; }
.cal-legend b { font-weight: inherit; }
.gcal__none { display: none; }

@media (max-width: 900px) {
  .topbar { margin-left: 0; }
  .topbar .brand--small { display: flex; margin-left: auto; margin-right: 0; }
  .topbar > form { display: block; }
  .topbar [data-drawer] { display: inline-grid; }
  .topbar .tbtn { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
  .topbar .tbtn.is-active { background: var(--grad-orange); border-color: transparent; }
  .tbtn__badge { border-color: var(--navy-900); }
  .modal__panel--narrow { min-height: 0; }

  /* phone calendar: dot under days that have sessions, message on empty days */
  .gcal__dayhead::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
  .gcal__dayhead.has-ev::after { background: var(--c-upcoming); }
  .gcal__none { display: block; margin: 0; padding: 16px 12px; text-align: center; color: var(--muted); font-weight: 600; font-size: 14px; position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
}
@media (max-width: 360px) {
  .topbar .brand--small { display: none; }
  .topbar > form { margin-left: auto; }
}
/* ---------- Welcome popup (3 seconds) ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; cursor: pointer;
  background: radial-gradient(900px 520px at 50% 35%, rgba(15, 45, 92, .92), rgba(6, 20, 41, .96));
  backdrop-filter: blur(10px); animation: welcomeIn .35s ease both, welcomeOut .5s ease 2.55s forwards;
}
@keyframes welcomeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcomeOut { to { opacity: 0; visibility: hidden; } }
.welcome__card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; text-align: center; padding: 34px 28px 30px; border-radius: 32px; color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: welcomePop .7s cubic-bezier(.2, 1.2, .3, 1) .1s both;
}
@keyframes welcomePop { from { opacity: 0; transform: translateY(30px) scale(.85); } to { opacity: 1; transform: none; } }
.welcome__logo { display: block; height: 46px; width: auto; margin: 0 auto 18px; animation: welcomeUp .6s ease .35s both; }
.welcome__wave { font-size: 54px; line-height: 1; display: inline-block; transform-origin: 70% 70%; animation: welcomeWave 1.4s ease-in-out .5s 2; }
@keyframes welcomeWave {
  0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-10deg); }
  45% { transform: rotate(16deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(10deg); }
}
.welcome__title { margin: 12px 0 8px; font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; animation: welcomeUp .6s ease .5s both; overflow-wrap: anywhere; }
.welcome__title b { display: inline-block; background: linear-gradient(90deg, #ffb066, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome__wish { margin: 0; font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, .85); animation: welcomeUp .6s ease .7s both; }
@keyframes welcomeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.welcome__bar { height: 5px; margin-top: 26px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.welcome__bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--grad-orange); transform-origin: left; animation: welcomeBar 3s linear forwards; }
@keyframes welcomeBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.welcome__spark { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.welcome__spark i { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: #ff9a3d; opacity: 0; animation: welcomeFloat 2.8s ease-out infinite; }
.welcome__spark i:nth-child(odd) { background: #5b8dff; }
.welcome__spark i:nth-child(3n) { background: #fff; width: 6px; height: 6px; }
.welcome__spark i:nth-child(1) { left: 8%; animation-delay: .1s; } .welcome__spark i:nth-child(2) { left: 18%; animation-delay: .7s; }
.welcome__spark i:nth-child(3) { left: 29%; animation-delay: .3s; } .welcome__spark i:nth-child(4) { left: 41%; animation-delay: 1.1s; }
.welcome__spark i:nth-child(5) { left: 52%; animation-delay: .5s; } .welcome__spark i:nth-child(6) { left: 63%; animation-delay: 1.4s; }
.welcome__spark i:nth-child(7) { left: 73%; animation-delay: .2s; } .welcome__spark i:nth-child(8) { left: 82%; animation-delay: .9s; }
.welcome__spark i:nth-child(9) { left: 90%; animation-delay: 1.7s; } .welcome__spark i:nth-child(10) { left: 35%; animation-delay: 1.9s; }
@keyframes welcomeFloat { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-105vh) scale(1.2); opacity: 0; } }
@media (max-width: 640px) {
  .welcome__card { padding: 28px 20px 24px; border-radius: 28px; }
  .welcome__title { font-size: 26px; }
  .welcome__wish { font-size: 16px; }
}
/* ---------- Phone schedule: week agenda (replaces the hour grid on small screens) ---------- */
.agenda { display: none; }
@media (max-width: 900px) {
  .gcal { display: none; }
  .agenda { display: flex; flex-direction: column; gap: 12px; }
  .ag-day {
    display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border-radius: 22px;
    background: rgba(255, 255, 255, .9); border: 1px solid rgba(10, 31, 63, .06); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
    animation: pageIn .4s ease both;
  }
  .ag-day.is-today { border-color: rgba(255, 122, 26, .5); box-shadow: 0 0 0 3px rgba(255, 122, 26, .12), var(--shadow-sm); }
  .ag-day.is-empty { background: rgba(255, 255, 255, .62); padding-top: 10px; padding-bottom: 10px; }
  .ag-date { display: flex; flex-direction: column; align-items: center; gap: 1px; }
  .ag-date span { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--muted); }
  .ag-date b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
  .ag-date small { font-size: 11px; font-weight: 600; color: var(--muted); }
  .ag-day.is-today .ag-date span { color: var(--orange-dark); }
  .ag-day.is-today .ag-date b { background: var(--grad-orange); color: #fff; box-shadow: 0 6px 16px rgba(255, 122, 26, .4); }
  .ag-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
  .ag-none { margin: 0; padding: 12px 0; color: var(--muted); font-weight: 600; font-size: 14px; }
  .ag-day:not(.is-empty) .ag-none { display: none; }
  .ag-ev {
    display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; border: 0; cursor: pointer; color: #fff;
    padding: 13px 15px; border-radius: 18px; border-left: 5px solid rgba(255, 255, 255, .55); box-shadow: 0 6px 16px rgba(10, 31, 63, .16);
    transition: transform .15s ease;
  }
  .ag-ev:active { transform: scale(.98); }
  .ag-ev.st-upcoming { background: linear-gradient(135deg, #5b8dff, #2556e8); }
  .ag-ev.st-pending { background: linear-gradient(135deg, #ff7a7a, #dc3545); }
  .ag-ev.st-completed { background: linear-gradient(135deg, #2fd085, #0f9d58); }
  .ag-ev.st-absent { background: linear-gradient(135deg, #a3aebf, #7b879a); }
  .ag-ev.st-cancelled { background: repeating-linear-gradient(45deg, #c8cfda, #c8cfda 8px, #d4dae3 8px, #d4dae3 16px); color: #4f5b6e; box-shadow: none; border-left-color: #9aa5b6; }
  .ag-ev.st-cancelled .ag-ev__title { text-decoration: line-through; }
  .ag-ev__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .ag-ev__time { font-weight: 800; font-size: 17px; }
  .ag-ev .pill { background: rgba(255, 255, 255, .25); color: inherit; font-size: 10px; padding: 4px 10px; }
  .ag-ev__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
  .ag-ev__sub { font-size: 14px; opacity: .92; }
  .ag-add {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 14px; cursor: pointer;
    border: 2px dashed #cdd6e4; background: transparent; color: var(--muted); font-weight: 800; letter-spacing: .6px; font-size: 13px;
  }
  .ag-add:active { background: var(--blue-soft); }
  .ag-day.is-empty .ag-list { flex-direction: row; align-items: center; justify-content: space-between; }
  .ag-day.is-empty .ag-add { padding: 0 14px; }
}
/* Phone agenda: days without sessions are not shown */
@media (max-width: 900px) {
  .ag-day.is-empty { display: none; }
  .ag-week-empty { text-align: center; padding: 34px 16px; }
}
@media (min-width: 901px) { .ag-week-empty { display: none; } }