@import url('https://fonts.googleapis.com/css2?family=Anton&family=Karla:wght@400;500;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --indigo: #241a45;
  --indigoSoft: #342763;
  --green: #1e7a41;
  --greenSoft: #e6f3ea;
  --gold: #e8ac2e;
  --goldDeep: #c98a12;
  --paper: #f6f2e9;
  --paperDim: #efe9da;
  --ink: #1c1730;
  --inkSoft: #5b5470;
  --danger: #c1443c;
  --dangerSoft: #fbe9e7;
  --amber: #d68f1e;
  --amberSoft: #fbf1de;
  --line: #e2dbc9;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Karla', sans-serif; background: var(--paper); }

/* ---- Login page ---- */
.login-page {
  background: var(--indigo) url('images/login-bg.jpg') center / cover no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}
.login-box {
  width: 100%;
  max-width: 360px;
  text-align: center;
  background: rgba(28, 23, 48, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 24px 22px;
  border: 1px solid rgba(246, 242, 233, 0.1);
}
.login-box form { text-align: left; }
.login-box label { display: block; color: var(--paper); font-size: 12px; margin-bottom: 6px; opacity: 0.8; }
.login-box input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--indigoSoft);
  background: var(--indigoSoft);
  color: var(--paper);
  font-size: 15px;
  margin-bottom: 16px;
  font-family: 'Karla', sans-serif;
}
.login-box input::placeholder { color: rgba(246,242,233,0.4); }
.login-box button {
  width: 100%;
  padding: 13px 0;
  border-radius: 8px;
  border: none;
  background: var(--gold);
  color: var(--indigo);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
  margin-top: 8px;
}
.login-box button:disabled { opacity: 0.6; cursor: not-allowed; }
.login-note { color: var(--inkSoft); font-size: 12px; margin-top: 20px; opacity: 0.6; }
.login-error {
  background: var(--dangerSoft);
  color: var(--danger);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}
.login-error.visible { display: block; }
.config-warning {
  background: var(--amberSoft);
  color: var(--amber);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: left;
}

/* ---- Home page ---- */
.home-page header {
  background: var(--indigo);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-brand img { width: 32px; height: 32px; display: block; }
.header-brand span {
  font-family: 'Anton', sans-serif;
  color: var(--paper);
  font-size: 17px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.home-page header button {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
}
main { padding: 24px 20px; max-width: 480px; margin: 0 auto; }
main .greeting { color: var(--inkSoft); font-size: 14px; margin: 0 0 2px; }
main h1 { font-family: 'Anton', sans-serif; color: var(--ink); font-size: 26px; margin: 0 0 24px; text-transform: uppercase; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.card-label { color: var(--inkSoft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; font-weight: 700; }
.balance-amount { font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.pill { display: inline-block; background: var(--amberSoft); color: var(--amber); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.pill-reason { color: var(--inkSoft); font-size: 13px; margin: 8px 0 0; }
.fixture-teams { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.fixture-when { font-size: 14px; color: var(--inkSoft); margin: 0; }
.footnote { color: var(--inkSoft); font-size: 12px; margin-top: 24px; text-align: center; opacity: 0.6; }
.loading-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--inkSoft);
  font-size: 14px;
}

/* ---- Slide-out menu (nav redesign, option B) ---- */
.home-page header { position: relative; }
.menu-btn {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.menu-btn svg { width: 22px; height: 22px; }
.header-center-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Anton', sans-serif;
  color: var(--paper);
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 23, 48, 0.45);
  z-index: 100;
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 72%;
  max-width: 300px;
  background: var(--indigoSoft);
  z-index: 101;
  padding: 20px 0;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}
.drawer-overlay.open .drawer-panel { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(246,242,233,0.12);
  margin-bottom: 10px;
}
.drawer-header img { width: 28px; height: 28px; }
.drawer-header span {
  font-family: 'Anton', sans-serif;
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--paper);
  font-size: 14px;
  text-decoration: none;
  border-left: 3px solid transparent;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: 'Karla', sans-serif;
}
.drawer-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.drawer-item.active {
  background: rgba(232, 172, 46, 0.12);
  border-left-color: var(--gold);
  font-weight: 700;
}
.drawer-divider {
  height: 1px;
  background: rgba(246,242,233,0.12);
  margin: 10px 20px;
}
.drawer-item.signout { color: var(--gold); margin-top: auto; }

/* ---- Notice read/unread indicator ---- */
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

/* ---- Watermark (all authenticated pages, not login or accept-invite) ---- */
body:not(.login-page):not(.accept-invite-page) {
  position: relative;
}
body:not(.login-page):not(.accept-invite-page)::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('images/watermark-crest.png') center 60% / 85vw no-repeat;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
body:not(.login-page):not(.accept-invite-page) > header,
body:not(.login-page):not(.accept-invite-page) > main {
  position: relative;
  z-index: 1;
}

/* ---- Drawer unread count badge ---- */
.drawer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--indigo);
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}

/* ---- Child switcher (multi-child guardian accounts only) ---- */
.child-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.child-tab {
  flex: 1 0 auto;
  min-width: 128px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  font-family: 'Karla', sans-serif;
}
.child-tab.active { border-color: var(--gold); background: var(--paperDim); }
.child-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Anton', sans-serif;
  font-size: 14px;
  color: #fff;
  background: var(--indigoSoft);
}
.child-tab .child-meta { min-width: 0; }
.child-tab .child-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.child-tab .child-squad { font-size: 11.5px; color: var(--inkSoft); }

