/* Brainland brand layer — the design tokens of www.brainland.bg
   (assets/css/style.css) applied to the parent/teacher portals and to the
   login and account pages. Everything below :root is scoped under .brand,
   which only those pages put on <body>, so admin screens never change.
   .brand rules (two classes) also outrank the admin base.html's unscoped
   .card/.btn-primary/... rules on the account pages that extend it. */

:root {
  --ink: #0f172a;
  --ink-soft: #43506b;
  --ink-mute: #6b7794;
  --ink-faint: #8a94ad;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --bg-deep: #0f1b3d;
  --line: #e5eaf3;
  --line-strong: #cfd6e4;

  --primary: #3b47c4;
  --primary-deep: #2a339b;
  --primary-soft: #eceefc;

  --kids: #e89b12;
  --kids-ink: #b47607;
  --kids-soft: #fdf3e0;
  --foreign: #0d9488;
  --foreign-soft: #e3f4f2;

  --font-display: "Sofia Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-primary: 0 6px 16px rgba(59, 71, 196, .25);
}

/* ---------- Base ---------- */

.brand {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-soft) !important;  /* beats the inline body background */
  -webkit-font-smoothing: antialiased;
}
.brand h1, .brand h2, .brand h3, .brand h4 {
  font-family: var(--font-display);
  letter-spacing: -.01em;
}
.brand a.link { color: var(--primary); font-weight: 500; text-decoration: none; }
.brand a.link:hover { color: var(--primary-deep); text-decoration: underline; }
[x-cloak] { display: none !important; }

/* ---------- Logo (mascot + "Brain|land|." wordmark) ---------- */

.brand .logo {
  display: inline-flex; align-items: center;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.2rem; letter-spacing: -.02em; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.brand .logo img { height: 34px; width: auto; margin-right: .55rem; }
.brand .logo span { color: var(--primary); }
.brand .logo .dot { color: var(--kids); }
.brand .logo-sub {
  display: block; margin-top: .2rem;
  font-family: var(--font-body); font-weight: 500;
  font-size: .7rem; letter-spacing: 0; color: var(--ink-mute);
}

/* ---------- Cards and labels ---------- */

.brand .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.brand .eyebrow {
  font-family: var(--font-display);
  font-weight: 700; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary);
}
.brand .icon-tile {
  flex-shrink: 0; width: 2rem; height: 2rem;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.brand .icon-tile svg { width: 1.05rem; height: 1.05rem; }
.brand .icon-tile.kids    { background: var(--kids-soft); color: var(--kids-ink); }
.brand .icon-tile.foreign { background: var(--foreign-soft); color: var(--foreign); }

/* ---------- Buttons ---------- */

.brand .btn-primary,
.brand .btn-secondary,
.brand .btn-danger {
  display: inline-flex; align-items: center; gap: .375rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: .9rem; line-height: 1.25;
  padding: .55rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.brand .btn-primary:active,
.brand .btn-secondary:active { transform: translateY(1px); }
.brand .btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.brand .btn-primary:hover { background: var(--primary-deep); }
.brand .btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.brand .btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.brand .btn-danger { background: #fef2f2; color: #dc2626; padding: .4rem .9rem; }
.brand .btn-danger:hover { background: #fee2e2; }

/* ---------- Navigation ---------- */

.brand .nav-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem; border-radius: 999px;
  color: var(--ink-soft); font-size: .875rem; font-weight: 500;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.brand .nav-link svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.brand .nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.brand .nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- Tables ---------- */

.brand .table-th {
  padding: .75rem 1rem; text-align: left;
  font-size: .72rem; font-weight: 600; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .08em;
}
.brand .table-td { padding: .75rem 1rem; font-size: .875rem; color: var(--ink-soft); }

/* ---------- Status badges (keep their meaning colours) ---------- */

.brand .badge-paid,
.brand .badge-pending,
.brand .badge-overdue {
  display: inline-flex; padding: .15rem .6rem;
  font-size: .75rem; font-weight: 600; border-radius: 999px;
}
.brand .badge-paid    { background: #dcfce7; color: #15803d; }
.brand .badge-pending { background: var(--kids-soft); color: var(--kids-ink); }
.brand .badge-overdue { background: #fee2e2; color: #dc2626; }

/* ---------- Forms ---------- */

.brand .form-label {
  display: block; margin-bottom: .3rem;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
/* Look only — no display/width here: the parent portal lays its controls
   out inline. .form-input (and the teacher base's own rule) make them
   full-width blocks where a page wants that. */
.brand .form-input { display: block; width: 100%; }
.brand .form-input,
.brand select,
.brand textarea,
.brand input[type=text], .brand input[type=number], .brand input[type=date],
.brand input[type=email], .brand input[type=password], .brand input[type=time] {
  box-sizing: border-box;
  padding: .55rem .8rem;
  font: inherit; font-size: .875rem;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.brand .form-input:focus,
.brand select:focus,
.brand textarea:focus,
.brand input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.brand input[type=checkbox], .brand input[type=radio] { accent-color: var(--primary); }
.brand input[type=file] { font: inherit; font-size: .85rem; color: var(--ink-soft); }
.brand input[type=file]::file-selector-button {
  margin-right: .75rem; padding: .45rem 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  color: var(--ink); background: #fff;
  border: 1.5px solid var(--line-strong); border-radius: 999px; cursor: pointer;
}
.brand input[type=file]::file-selector-button:hover { border-color: var(--primary); color: var(--primary); }
