/* FIFI SWIM TEAM - panel (same palette as the PDF offer) */
:root {
  --deep: #0b3a4a; --ink: #0d2733; --teal: #0e7f97; --teal-2: #17a2bd; --aqua: #5cc8da; --mist: #eef8fa; --foam: #f7fcfd;
  --line: #d6ecf1; --muted: #5b7680; --bad: #c2413b; --warn: #c98a17; --ok: #1f8a6a;
  --r: 18px; --shadow: 0 18px 40px -26px rgba(11, 58, 74, .55);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.55 'Inter', system-ui, sans-serif; color: var(--ink); background: linear-gradient(180deg, #e3f4f7, var(--foam) 340px); min-height: 100vh; }
body.no-scroll { overflow: hidden; }
a { color: var(--teal); }
h1, h2 { margin: 0; letter-spacing: -.02em; color: var(--deep); }
h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; line-height: 1.1; }
h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.eyebrow::after { content: ''; display: block; width: 34px; height: 2px; background: var(--teal-2); margin-top: 8px; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 140px; height: auto; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 10px; font: 600 14.5px 'Inter', sans-serif; color: #fff; background: var(--deep); cursor: pointer; text-decoration: none; transition: background .2s, transform .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--teal); }
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 8px 13px; font-size: 13.5px; }
.btn--wide { width: 100%; padding: 14px; margin-top: 6px; }
.btn--ghost { background: #fff; color: var(--deep); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { background: var(--mist); }
.btn--danger { background: var(--bad); }
.btn--danger:hover { background: #a3322d; }
.btn--danger-ghost { background: transparent; color: var(--bad); box-shadow: inset 0 0 0 1.5px #f0c9c6; }
.btn--danger-ghost:hover { background: #fdf0ef; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--mist); color: var(--deep); font-size: 20px; line-height: 1; cursor: pointer; }
.icon-btn:hover { background: var(--line); }
.link { border: 0; background: none; color: var(--teal); font: 600 13px 'Inter', sans-serif; cursor: pointer; padding: 2px 4px; }
.link--bad { color: var(--bad); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--deep); }
.form label small { font-weight: 500; color: var(--muted); }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.form__who { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input, select, textarea { width: 100%; font: 15px 'Inter', sans-serif; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-2); box-shadow: 0 0 0 4px rgba(23, 162, 189, .15); }
textarea { resize: vertical; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 10px !important; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row input { flex: 1; min-width: 160px; }
.row-end { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-top: 4px; }
.row-end small { margin-right: auto; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 30px 16px;
  background: url('/img/water-light.jpg') 0 0/760px auto repeat; }
.auth__card { width: min(420px, 100%); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: 24px; padding: 34px 30px; box-shadow: 0 40px 80px -40px rgba(11,58,74,.6); text-align: center; animation: rise .6s cubic-bezier(.2,.8,.2,1); }
.auth__card .form { text-align: left; margin-top: 18px; }
.auth__logo { width: 190px; height: auto; margin: 0 auto; display: block; border-radius: 4px; }
.auth__brand { font: 600 22px 'Montserrat', sans-serif; letter-spacing: .22em; color: var(--deep); margin: 8px 0 0; }
.auth__sub { font: 500 10.5px 'Montserrat', sans-serif; letter-spacing: .42em; color: var(--teal); margin-bottom: 22px; }
.auth h1 { font-size: 24px; margin-bottom: 4px; }
.auth__help { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.auth__back { color: var(--deep); font-weight: 600; font-size: 14px; text-decoration: none; background: rgba(255,255,255,.7); padding: 8px 14px; border-radius: 999px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* shell */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 12px clamp(16px, 3vw, 34px); background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.top__brand img { width: 56px; height: auto; }
.top__brand span { display: flex; flex-direction: column; line-height: 1.15; }
.top__brand b { font: 600 13px 'Montserrat', sans-serif; letter-spacing: .2em; color: var(--deep); }
.top__brand small { font-size: 11px; color: var(--teal); font-weight: 600; }
.top__nav { display: flex; gap: 4px; }
.top__nav a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--deep); font-weight: 600; font-size: 14.5px; }
.top__nav a:hover { background: var(--mist); }
.top__nav a.is-on { background: var(--deep); color: #fff; }
.top__me { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top__name { font-weight: 600; font-size: 14px; color: var(--muted); margin-right: 4px; }
.main { width: min(1180px, 100% - 32px); margin: 28px auto 40px; animation: rise .45s cubic-bezier(.2,.8,.2,1); }
.foot { text-align: center; padding: 20px; font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.head, .hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.head__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; margin-bottom: 14px; font-weight: 600; font-size: 14px; text-decoration: none; }
.search { width: 220px; }

/* cards */
.card { background: #fff; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 18px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.card__head h2 { margin: 0; }
.card--goal { background: linear-gradient(120deg, var(--deep), #11586b); color: #fff; border: 0; }
.card--goal h2 { color: var(--aqua); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + .card, .card + .grid2, .grid2 + .grid2 { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 30px; font-weight: 800; color: var(--teal); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.hello__stats { display: flex; gap: 12px; }
.hello__stats .stat { min-width: 140px; }
.empty { color: var(--muted); font-size: 14.5px; padding: 6px 0; margin: 0; }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.private { background: #fff7ea; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.private small { color: var(--warn); font-weight: 700; }

/* lessons */
.lesson { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 10px; margin: 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 0; transition: background .2s; }
.lesson:first-of-type { border-top: 0; }
.lesson:hover { background: var(--mist); }
.lesson__time { display: flex; flex-direction: column; min-width: 54px; }
.lesson__time b { font-size: 16px; color: var(--deep); }
.lesson__time small, .lesson__main small { color: var(--muted); font-size: 12.5px; }
.lesson__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lesson__main b { font-weight: 600; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.st-planned { background: #e1f5f9; color: var(--teal); }
.st-done { background: #e0f3ec; color: var(--ok); }
.st-cancelled { background: #eef1f2; color: #6f7f85; }
.st-excused { background: #fff2d9; color: #a06a00; }
.st-late { background: #ffe6d6; color: #b4531a; }
.st-absent { background: #fde5e3; color: var(--bad); }
.legend { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }

/* week */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.day { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; }
.day.is-today { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(23,162,189,.15); }
.day header { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--deep); text-transform: capitalize; }
.day__empty { color: #a9bfc5; font-size: 13px; margin: 6px 2px; }
.slot { text-align: left; border: 0; border-radius: 11px; padding: 9px 10px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px; border-left: 4px solid currentColor; transition: transform .2s, box-shadow .2s; }
.slot:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.slot b { font-size: 13px; }
.slot span { font-weight: 600; font-size: 14px; color: var(--ink); }
.slot small { font-size: 12px; color: var(--muted); }

/* students table */
.table { background: #fff; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.trow { display: grid; grid-template-columns: 2fr 1.2fr .6fr 1fr; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .2s; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--mist); }
.trow.is-off { opacity: .55; }
.trow__name { display: flex; flex-direction: column; }
.trow__name small, .trow__cell small { color: var(--muted); font-size: 12px; }
.trow__cell { display: flex; flex-direction: column; font-size: 14px; }
.trow__cell em { color: #a9bfc5; font-style: normal; }

/* skills */
.skills { display: grid; gap: 10px; }
.skill { display: grid; grid-template-columns: 120px 1fr 110px; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.skill output { font-size: 12.5px; color: var(--muted); font-weight: 500; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 8px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--teal-2) calc(var(--v, 0) * 100%), var(--line) 0); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--teal); cursor: pointer; }
.bar { display: grid; grid-template-columns: 110px 1fr 100px; gap: 12px; align-items: center; padding: 6px 0; font-size: 14px; font-weight: 600; }
.bar small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.bar__track { height: 10px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.bar__track i { display: block; height: 100%; width: calc(var(--v) * 100%); background: linear-gradient(90deg, var(--aqua), var(--teal)); border-radius: 99px; animation: grow 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { width: 0; } }

/* notes */
.note { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.note:first-of-type { border-top: 0; }
.note header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.note header small { color: var(--muted); font-size: 12px; }
.note p { margin: 0; white-space: normal; }
.note__act { margin-left: auto; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--mist); color: var(--teal); }
.note--uwaga .tag { background: #fff2d9; color: #a06a00; }
.note--ustalenie .tag { background: var(--deep); color: #fff; }
.note--postep .tag { background: #e0f3ec; color: var(--ok); }

/* student home */
.next { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.next:first-of-type { border-top: 0; }
.next[hidden] { display: none; }
.next__date { width: 62px; height: 62px; flex: none; border-radius: 14px; background: var(--mist); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--deep); }
.next--first .next__date { background: var(--deep); color: #fff; }
.next__date b { font-size: 22px; line-height: 1; }
.next__date span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.next__main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.next__main b { text-transform: capitalize; }
.next__main small { color: var(--muted); }
.next__main p { margin: 6px 0 0; font-size: 14px; }
.hist { border-top: 1px solid var(--line); padding: 12px 0; }
.hist:first-of-type { border-top: 0; }
.hist__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.hist__top b { text-transform: capitalize; }
.hist p { margin: 6px 0 0; font-size: 14px; }
.hist__note { background: var(--mist); border-radius: 10px; padding: 10px 12px; border-left: 3px solid var(--teal-2); }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(6, 30, 39, .45); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.modal.is-on { opacity: 1; }
.modal__box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.5); transform: translateY(16px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.modal__box--wide { width: min(680px, 100%); }
.modal.is-on .modal__box { transform: none; }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 0; }
.modal__head h2 { margin: 0; font-size: 19px; }
.modal__body { padding: 16px 22px 22px; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; background: var(--mist); border-radius: 12px; padding: 14px 16px; margin: 12px 0; font-size: 15px; }
.cred span { color: var(--muted); font-size: 13px; }
.cred b { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--deep); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow); transition: all .3s cubic-bezier(.2,.8,.2,1); max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { background: var(--bad); }

@media (max-width: 1000px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .top__nav { order: 3; width: 100%; overflow-x: auto; }
  .top__name { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 > .card { margin-bottom: 0; }
  .trow { grid-template-columns: 1fr 1fr; }
  .skill, .bar { grid-template-columns: 96px 1fr; }
  .skill output, .bar small { grid-column: 2; margin-top: -6px; }
  .search { width: 100%; }
  .next { flex-wrap: wrap; }
  .next .btn { margin-left: 78px; }
}
