/*
 * TAMITOS web — the same design system as the app, on a bigger screen.
 *
 * Two rules the whole file follows. Every colour and radius here already
 * exists in `lib/config/app_constants.dart`, so a card on the web and a card
 * in the app are the same card. And nothing is styled per page: a family
 * applying for help and a foundation registering a sponsorship walk through
 * the same shell, because they are the same act — offering something.
 */

:root {
  --ink: #3e3558;
  --ink-soft: #6b6383;
  --ink-faint: #9a94ad;

  --cyan: #56c7ed;
  --cyan-dark: #4aa8e0;
  --purple: #b197fc;
  --green: #69db7c;
  --error: #d84a3c;
  --error-soft: #fdeceb;

  --surface: #ffffff;
  --surface-muted: #f4f2f8;
  --line: #ece9f2;
  --line-strong: #ddd8e8;

  --r-card: 20px;
  --r-field: 14px;
  --r-pill: 46px;

  --gutter: 40px;
  --shadow-card: 0 10px 30px rgba(62, 53, 88, 0.08);
  --shadow-pill: 0 6px 16px rgba(74, 168, 224, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Baloo 2', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

/* ------------------------------------------------------------------ shell */

/* The wizard is two halves: what you are doing on the left, and the doing
 * itself on the right. The left half never scrolls — it is the one thing
 * that should still be true when you are four fields deep. */
.shell {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 100vh;
}

.shell__left {
  padding: 56px var(--gutter);
  display: flex;
  flex-direction: column;
}

.shell__right {
  position: relative;
  padding: 32px var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  /* Blue at the top, warm green at the bottom — the gradient from the
   * register flow, kept soft enough that white cards still read as raised. */
  background:
    radial-gradient(120% 90% at 8% 0%, #a9d8f5 0%, rgba(169, 216, 245, 0) 55%),
    radial-gradient(120% 90% at 100% 100%, #dbe8b4 0%, rgba(219, 232, 180, 0) 60%),
    linear-gradient(160deg, #cfe6fa 0%, #eef1f2 45%, #e5eecd 100%);
}

/* Nearly everywhere this is a link home, and a logo with an underline under
 * it is not a logo. Said once here rather than again in every context that
 * happens to use it. */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
}

/* Only when it is a link: enough of a response to hover that somebody
 * wondering whether it is clickable finds out by pointing at it. */
a.brand { transition: opacity 0.15s; }
a.brand:hover { opacity: 0.72; }

.shell__lede { margin-top: auto; margin-bottom: auto; max-width: 420px; }

.shell__lede h1 {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.shell__rule {
  height: 2px;
  width: 190px;
  margin: 22px 0;
  background: var(--line-strong);
  border-radius: 2px;
}

.shell__lede p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.shell__foot {
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.5;
}

/* -------------------------------------------------------------- top strip */

.top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 44px;
}

.step-count {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ------------------------------------------------------------------ forms */

.form {
  margin: auto 0;
  width: 100%;
  max-width: 560px;
  align-self: center;
}

.field { margin-bottom: 18px; }

.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="month"],
.field select,
.field textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--r-field);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field textarea { min-height: 132px; resize: vertical; line-height: 1.55; }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--cyan-dark);
  box-shadow: 0 0 0 4px rgba(86, 199, 237, 0.18);
}

.field__hint {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.field--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* A money field says its unit rather than making the user guess. */
.money { position: relative; }
.money input { padding-right: 44px; }
.money::after {
  content: '€';
  position: absolute;
  right: 16px;
  top: 38px;
  font-weight: 700;
  color: var(--ink-soft);
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-field);
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--cyan-dark); }
.check span { color: var(--ink-soft); }
.check strong { color: var(--ink); font-weight: 600; }

/* The honeypot. Left in the DOM, out of the layout, never focusable. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ cards */

.choice {
  display: flex;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border: 2px solid transparent;
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.choice:hover { transform: translateY(-1px); }
.choice input { display: none; }
.choice:has(input:checked) { border-color: var(--cyan); }

.choice__icon {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #dce9f5, #e8dff6);
  display: grid;
  place-items: center;
  font-size: 24px;
}

.choice h3 { font-size: 18px; font-weight: 700; }
.choice p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }

/* ---------------------------------------------------------------- buttons */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--r-pill);
  padding: 15px 34px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: filter 0.15s, box-shadow 0.15s;
}

.btn--primary {
  background: linear-gradient(90deg, var(--cyan-dark), var(--cyan));
  color: #fff;
  box-shadow: var(--shadow-pill);
}

.btn--primary:hover { filter: brightness(1.04); }

/* Genuinely off, not grey-and-still-clickable. */
.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  background: var(--line-strong);
  color: #8d879d;
  box-shadow: none;
  cursor: not-allowed;
}

.btn--ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
.btn--quiet { background: transparent; color: var(--ink-soft); padding-left: 0; }
.btn--danger { background: var(--error-soft); color: var(--error); }
.btn--small { padding: 10px 20px; font-size: 14px; }

/* ---------------------------------------------------------------- notices */

.notice {
  border-radius: var(--r-field);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.notice--error { background: var(--error-soft); color: var(--error); }
.notice--ok { background: #e9f8ec; color: #2f7d3f; }

/* ------------------------------------------------------------------ done */

.done {
  margin: auto 0;
  max-width: 520px;
  align-self: center;
  background: var(--surface);
  border-radius: 26px;
  padding: 44px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.done__mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-dark), var(--cyan));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
}

.done h2 { font-size: 30px; font-weight: 800; line-height: 1.15; }
.done p { margin-top: 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink-soft); }

/* ------------------------------------------------------------------ admin */

.admin { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }

.side {
  background: #2b2540;
  color: #fff;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side .brand { color: #fff; margin-bottom: 26px; }

.side a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14.5px;
  font-weight: 600;
}

.side a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.side a.is-on { background: rgba(255, 255, 255, 0.13); color: #fff; }

/* The brand is a link out to the public site, not one of the sections, so it
 * does not take the padded, hoverable box the navigation items share. */
.side a.brand { padding: 0; background: none; color: #fff; }
.side a.brand:hover { background: none; }

.side__count {
  background: var(--cyan);
  color: #17324a;
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 800;
}

.side__foot { margin-top: auto; font-size: 12.5px; color: rgba(255, 255, 255, 0.45); line-height: 1.5; }

.main { padding: 34px 40px 60px; background: #faf9fc; }

.main__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.main__head h1 { font-size: 30px; font-weight: 800; }
.main__head p { margin-top: 5px; font-size: 14.5px; color: var(--ink-soft); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  margin-bottom: 22px;
}

.panel > h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px;
}

.stat__label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.stat__value { font-size: 27px; font-weight: 800; line-height: 1.2; margin-top: 4px; letter-spacing: -0.4px; }
.stat__note { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }

/* The same two-tone bar as the app: cyan is the sponsor's money that
 * movement unlocked, purple is what people paid by card. */
.bar { height: 9px; border-radius: 9px; background: #e4e1ec; overflow: hidden; display: flex; }
.bar__movement { background: linear-gradient(90deg, var(--cyan-dark), var(--cyan)); }
.bar__direct { background: var(--purple); }
.bar__done { background: var(--green); }

.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.slot {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
}

.slot--free {
  border-style: dashed;
  border-color: var(--line-strong);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.slot__no { font-size: 12px; font-weight: 700; color: var(--ink-faint); letter-spacing: 0.08em; }
.slot__name { font-size: 18px; font-weight: 700; margin-top: 3px; }
.slot__purpose { font-size: 13px; color: var(--ink-soft); line-height: 1.45; margin-top: 4px; }
.slot__money { margin-top: auto; padding-top: 12px; font-size: 13px; color: var(--ink-soft); }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 12px 10px;
}

td { padding: 14px 12px; border-top: 1px solid var(--line); font-size: 14.5px; vertical-align: top; }
tr:hover td { background: #fcfbfe; }

td .who { font-weight: 700; }
td .sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
td.num { text-align: right; font-weight: 700; white-space: nowrap; }
td.act { text-align: right; white-space: nowrap; }

.tag {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 700;
}

.tag--review { background: #fff3d9; color: #9a6a00; }
.tag--ok { background: #e9f8ec; color: #2f7d3f; }
.tag--live { background: #e2f4fd; color: #1c6b96; }
.tag--no { background: var(--error-soft); color: var(--error); }
.tag--idle { background: var(--surface-muted); color: var(--ink-soft); }
.tag--grey { background: var(--surface-muted); color: var(--ink-soft); }

.empty { padding: 34px 0; text-align: center; color: var(--ink-faint); font-size: 14.5px; }

/* --------------------------------------------------------------- detail */

.detail { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.detail dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; row-gap: 12px; column-gap: 16px; }
.detail dt { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.detail dd { margin: 0; font-size: 14.5px; }
/* Real paragraphs now, not one pre-wrapped blob. `white-space: pre-wrap`
   lived here while the text was rendered whole; with <p> elements it doubled
   every gap, because the newlines the parent typed were still in the markup
   on top of the margin between paragraphs. */
.story-text { font-size: 15px; line-height: 1.65; color: var(--ink); }
.story-text p { margin: 0 0 14px; }
.story-text p:last-child { margin-bottom: 0; }

.sensitive {
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: #fbfaff;
}

@media (max-width: 1080px) {
  .shell { grid-template-columns: 1fr; }
  .shell__left { padding: 32px 24px; }
  .shell__lede h1 { font-size: 34px; }
  /* On one column the footnote lands directly under the lede instead of at
     the bottom of a tall left panel, and without this the two paragraphs read
     as one. The privacy note is the sentence a parent is looking for; it
     should not arrive as the fifth line of something else. */
  .shell__foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
  .admin { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .stats, .slots { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ upload */

/* A photo is not a nice-to-have here. Somebody scrolling the app decides in
 * about a second, and a card with no face on it loses to one that has. So the
 * cover is required and the zone says so before the family gets to the end and
 * finds out. */
.drop {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.72);
  padding: 26px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.drop:hover, .drop.is-over { border-color: var(--cyan-dark); background: rgba(255, 255, 255, 0.92); }
.drop input[type="file"] { display: none; }
.drop__icon { display: block; margin: 0 auto; }
.drop__title { font-weight: 700; font-size: 15px; margin-top: 6px; }
.drop__note { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }

.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-muted);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb__x {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 16, 32, 0.62);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.thumb--cover::after {
  content: 'Hlavná';
  position: absolute;
  left: 6px; bottom: 6px;
  background: var(--cyan-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.files { margin-top: 14px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}

.file-row__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__size { font-size: 12.5px; color: var(--ink-faint); }

.file-row__x {
  border: 0; background: none; cursor: pointer;
  color: var(--ink-faint); font-size: 16px; line-height: 1;
}

/* ------------------------------------------------------------ story page */

.story-page { max-width: 1080px; margin: 0 auto; padding: 40px var(--gutter) 80px; }
.story-page__title { font-size: 42px; font-weight: 800; line-height: 1.12; letter-spacing: -0.6px; max-width: 760px; }
.story-page__grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-top: 28px; align-items: start; }
.story-page__cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-card); display: block; }
.story-page__gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.story-page__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

.rail { border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; position: sticky; top: 24px; }
.rail__raised { font-size: 30px; font-weight: 800; letter-spacing: -0.4px; }
.rail__goal { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.rail__split { font-size: 13px; color: var(--ink-soft); margin-top: 12px; line-height: 1.6; }
.rail__key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: baseline; }

.verified {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft); line-height: 1.5;
}

/* -------------------------------------------------------------- site bar */

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.story-page__teaser {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 700px;
  margin-top: 14px;
}

/* Until a family has uploaded a cover there is nothing honest to show, so the
 * space is held rather than filled with a stock photograph of somebody
 * else's child. */
.story-page__cover--none {
  background: linear-gradient(135deg, #dce9f5, #e8dff6);
}

.rail__meta {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 14px;
}

.move-cta {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 32px;
  padding: 26px 28px;
  border-radius: var(--r-card);
  background:
    radial-gradient(120% 140% at 0% 0%, #d6ecfa 0%, rgba(214, 236, 250, 0) 60%),
    linear-gradient(120deg, #eef7fd 0%, #f2f7e9 100%);
}

.move-cta h2 { font-size: 20px; font-weight: 800; }
.move-cta p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.move-cta .btn { flex: none; }

@media (max-width: 1080px) {
  .story-page__grid { grid-template-columns: 1fr; }
  .rail { position: static; }
  .move-cta { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- support */

.split-note {
  background: rgba(255, 255, 255, 0.92);
  border-left: 3px solid var(--cyan-dark);
  border-radius: var(--r-field);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.split-note strong { color: var(--ink); font-weight: 700; }

.pay {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.pay--quiet { background: rgba(255, 255, 255, 0.7); box-shadow: none; }

.pay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pay h3 { font-size: 18px; font-weight: 700; }

.pay__tag {
  background: #e9f8ec;
  color: #2f7d3f;
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pay__tag--alt { background: #f1ecff; color: #6b4fd0; }

.pay__note {
  margin-top: 6px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.bank { margin: 0; display: grid; grid-template-columns: 130px 1fr; row-gap: 1px; }

.bank dt,
.bank dd {
  margin: 0;
  padding: 11px 0;
  font-size: 14.5px;
  border-top: 1px solid var(--line);
}

.bank dt { color: var(--ink-soft); font-weight: 600; }
.bank dd { text-align: right; font-weight: 700; }

/* Grouped, so it can be read aloud over the phone and typed without
 * losing your place. */
.bank__iban { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.copy {
  display: block;
  margin-left: auto;
  margin-top: 4px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cyan-dark);
  cursor: pointer;
}
