:root {
  color-scheme: light;
  --forest: #0b2c6b;
  --forest-2: #15479a;
  --lime: #ffd21f;
  --lime-soft: #fff5bf;
  --ink: #14213d;
  --muted: #667085;
  --line: #dfe4ee;
  --surface: #ffffff;
  --canvas: #f3f5fa;
  --danger: #d62f3e;
  --danger-soft: #ffe8ea;
  --amber: #a76b00;
  --amber-soft: #fff2ba;
  --shadow: 0 12px 34px rgba(11, 44, 107, 0.12);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.auth-screen { display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 1.05fr) minmax(440px, .95fr); background: white; }
.auth-brand-panel { position: relative; display: flex; overflow: hidden; align-items: center; padding: clamp(45px, 7vw, 110px); background: var(--forest); color: white; }
.auth-brand-panel::before { position: absolute; inset: auto -18% -35% auto; width: 560px; height: 560px; border: 84px solid rgba(255,210,31,.12); border-radius: 50%; content: ""; }
.auth-brand-copy { position: relative; z-index: 2; max-width: 590px; }
.auth-crest { width: 68px; height: 78px; margin-bottom: 42px; border-width: 3px; border-radius: 15px 15px 25px 25px; font-size: 20px; }
.eyebrow.light { color: var(--lime); }
.auth-brand-copy h1 { max-width: 560px; margin: 14px 0 20px; font-size: clamp(42px, 5vw, 70px); line-height: .98; letter-spacing: -.06em; }
.auth-brand-copy p { max-width: 500px; margin: 0; color: rgba(255,255,255,.68); font-size: 18px; line-height: 1.6; }
.auth-stripes { position: absolute; inset: 0; pointer-events: none; }
.auth-stripes span { position: absolute; right: -70px; width: 280px; height: 22px; transform: rotate(-42deg); border-radius: 99px; }
.auth-stripes span:first-child { top: 18%; background: var(--lime); }
.auth-stripes span:last-child { top: 24%; right: -105px; background: var(--danger); }
.auth-form-panel { display: grid; place-items: center; padding: 42px; }
.auth-box { width: min(440px, 100%); }
.auth-box h2 { margin: 6px 0 8px; font-size: 38px; letter-spacing: -.05em; }
.auth-mobile-brand { display: none; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 30px 0 22px; padding: 5px; border-radius: 13px; background: #eef1f7; }
.auth-tab { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.auth-tab.active { background: white; color: var(--forest); box-shadow: 0 3px 12px rgba(11,44,107,.1); }
.auth-form { display: grid; gap: 15px; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.auth-form input { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); outline: none; }
.auth-form input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(21,71,154,.12); }
.auth-submit { width: 100%; min-height: 49px; margin-top: 3px; }
.field-hint { margin-top: -10px; color: var(--muted); }
.form-message { min-height: 18px; margin: -2px 0; color: var(--danger); font-size: 13px; line-height: 1.4; }
.form-message.success { color: var(--forest-2); }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 26px 18px 20px;
  background: var(--forest);
  color: white;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand > span { min-width: 0; }
.brand strong, .brand small { display: block; }
.brand strong { overflow-wrap: anywhere; font-size: 17px; line-height: 1.05; letter-spacing: -0.02em; }
.brand small { margin-top: 2px; color: rgba(255,255,255,.62); font-size: 12px; }
.crest {
  display: grid;
  width: 43px;
  height: 49px;
  place-items: center;
  border: 2px solid var(--lime);
  border-radius: 10px 10px 17px 17px;
  background: rgba(255,255,255,.05);
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.06em;
  box-shadow: inset 0 0 0 3px var(--forest);
}
.desktop-nav { display: grid; gap: 7px; margin-top: 42px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: rgba(255,255,255,.68);
  font-size: 14px;
  font-weight: 650;
  transition: .18s ease;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.1); color: white; }
.nav-link.active { box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 22px; font-size: 19px; text-align: center; }
.profile-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: white;
  text-align: left;
  cursor: pointer;
}
.profile-card strong, .profile-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card strong { font-size: 13px; }
.profile-card small { margin-top: 2px; color: rgba(255,255,255,.55); font-size: 11px; }
.sidebar-notifications { display: flex; align-items: center; gap: 9px; margin: auto 12px 8px; padding: 10px 12px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; text-align: left; }
.sidebar-notifications strong { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 10px; background: var(--danger); font-size: 11px; text-align: center; }
.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest);
  font-size: 12px;
  font-weight: 900;
}
.player-avatar { background: #dce6ff; color: #234b98; }

.main-content { min-height: 100vh; margin-left: 252px; }
#view { width: min(1180px, 100%); margin: 0 auto; padding: 38px 42px 70px; }
.mobile-header, .mobile-nav { display: none; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin: 5px 0 4px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.045em; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--forest-2); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  cursor: pointer;
}
.button.primary { background: var(--forest); color: white; box-shadow: 0 7px 20px rgba(11,44,107,.2); }
.button.primary:hover { background: var(--forest-2); }
.button.secondary { border-color: var(--line); background: white; }
.button.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); gap: 20px; }
.event-hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 30px;
  border-radius: 26px;
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow);
}
.event-hero::after {
  position: absolute;
  top: -80px;
  right: -55px;
  width: 270px;
  height: 270px;
  border: 52px solid rgba(255,210,31,.13);
  border-radius: 50%;
  content: "";
}
.event-hero > * { position: relative; z-index: 1; }
.event-kicker { display: flex; align-items: center; gap: 8px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(255,210,31,.16); }
.event-hero h2 { max-width: 540px; margin: 20px 0 8px; font-size: clamp(27px, 4vw, 43px); letter-spacing: -.05em; line-height: 1.02; }
.event-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 20px 0 28px; color: rgba(255,255,255,.72); font-size: 14px; }
.event-meta span { display: inline-flex; align-items: center; gap: 7px; }
.rsvp-label { margin: 0 0 10px; color: rgba(255,255,255,.56); font-size: 12px; font-weight: 700; }
.rsvp-group { display: flex; gap: 9px; }
.rsvp-button {
  min-height: 43px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: white;
  font-weight: 750;
  cursor: pointer;
}
.rsvp-button:hover { background: rgba(255,255,255,.13); }
.rsvp-button.active.yes { border-color: var(--lime); background: var(--lime); color: var(--forest); }
.rsvp-button.active.maybe { border-color: #ffd777; background: #ffd777; color: #5d3a00; }
.rsvp-button.active.no { border-color: #ff9e98; background: #ff9e98; color: #641914; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(11,44,107,.06); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2, .card-head h3 { margin: 0; letter-spacing: -.025em; }
.card-head h2 { font-size: 20px; }
.card-head h3 { font-size: 17px; }
.status-list { display: grid; gap: 15px; }
.status-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.status-row strong { display: block; font-size: 14px; }
.status-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.count-pill { display: grid; min-width: 39px; height: 31px; place-items: center; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 850; }
.count-pill.yes { background: var(--lime-soft); color: var(--forest); }
.count-pill.maybe { background: var(--amber-soft); color: var(--amber); }
.count-pill.no { background: var(--danger-soft); color: var(--danger); }
.progress { height: 7px; margin-top: 22px; overflow: hidden; border-radius: 99px; background: #edf0ee; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.progress-caption { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }

.section { margin-top: 30px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.text-link { border: 0; background: none; color: var(--forest-2); font-weight: 800; cursor: pointer; }
.schedule-list { overflow: hidden; }
.schedule-row { display: grid; grid-template-columns: 58px minmax(0,1fr) auto auto auto; gap: 12px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-row.cancelled { opacity: .7; background: #f8f9fc; }
.schedule-row.cancelled .schedule-copy strong { text-decoration: line-through; }
.schedule-copy small { display: block; margin-top: 4px; color: var(--muted); }
.event-actions { display: flex; gap: 2px; }
.event-actions .icon-button { width: 34px; height: 34px; }
.danger-text { color: #a32626; }
.button.danger { background: #a32626; color: #fff; border-color: #a32626; }
.type-badge.cancelled { background: #fde8e8; color: #922; }
.event-section { margin-top: 26px; }
.event-section > h2 { margin: 0 0 10px; font-size: 17px; }
.empty-state.compact { padding: 22px; }
.event-deadline { margin: -12px 0 18px; color: rgba(255,255,255,.75); font-size: 13px; }
.event-description { max-width: 720px; margin: -8px 0 18px; color: rgba(255,255,255,.82); line-height: 1.5; white-space: pre-line; }
.response-comment { width: 100%; margin-top: 12px; resize: vertical; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; }
.response-comment::placeholder { color: rgba(255,255,255,.62); }
.notification-button { position: relative; margin-left: auto; }
.notification-button span { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #d8242f; color: #fff; font: 700 10px/17px system-ui; }
.notification-list { display: grid; gap: 8px; max-height: 55vh; overflow: auto; }
.notification-item { display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.notification-item.unread { border-left: 4px solid var(--forest); background: #f4f7ff; }
.notification-item span, .notification-item small { color: var(--muted); }
.wide-dialog { width: min(980px, calc(100vw - 32px)); }
.team-signal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.signal-item { display: flex; align-items: center; gap: 11px; min-height: 70px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #f8f9fc; }
.signal-item strong, .signal-item small { display: block; }
.signal-item small { margin-top: 3px; color: var(--muted); }
.signal-dot { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: #9aa4b2; box-shadow: 0 0 0 5px rgba(154,164,178,.15); }
.signal-item.green .signal-dot { background: #1b9b55; box-shadow: 0 0 0 5px rgba(27,155,85,.14); }
.signal-item.yellow .signal-dot { background: #e0a100; box-shadow: 0 0 0 5px rgba(224,161,0,.15); }
.signal-item.red .signal-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(214,47,62,.14); }
.organization-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.organization-grid > section { min-width: 0; }
.organization-card, .task-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.organization-card strong, .organization-card span, .organization-card small, .task-row strong, .task-row span { display: block; }
.organization-card span, .organization-card small, .task-row span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.sub-form { margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--canvas); }
.sub-form h4, #carpoolList h4 { margin: 0 0 10px; }
.my-assignment { margin-top: 12px; padding: 10px; border-radius: 10px; background: var(--lime-soft); }
.task-row { justify-content: flex-start; }
.task-row > .icon-button { margin-left: auto; }
.task-row.completed { opacity: .6; }
.task-row.completed strong { text-decoration: line-through; }
.task-check { width: 28px; height: 28px; flex: 0 0 28px; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: #fff; cursor: pointer; }
.task-row.completed .task-check { border-color: #1b9b55; background: #1b9b55; }
.statistics-table td small { display: block; margin-top: 3px; color: var(--muted); white-space: nowrap; }
.stats-note p { margin: 5px 0 0; color: var(--muted); }
.match-button-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#matchStatsRows input[type="number"] { width: 74px; }
.date-tile { text-align: center; }
.date-tile strong, .date-tile span { display: block; }
.date-tile strong { font-size: 23px; line-height: 1; }
.date-tile span { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.schedule-copy strong { display: block; font-size: 15px; }
.schedule-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.type-badge { display: inline-flex; min-height: 26px; align-items: center; padding: 0 9px; border-radius: 999px; background: #eaf0fb; color: var(--forest-2); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.type-badge.match { background: #e8efff; color: #2756a4; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 19px; }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 7px; font-size: 27px; letter-spacing: -.04em; }
.stat-card small { display: block; margin-top: 4px; color: var(--forest-2); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .8fr); gap: 18px; margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 34px; height: 34px; font-size: 10px; }
.person strong, .person small { display: block; }
.person small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.response-chip { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.response-chip.yes { background: var(--lime-soft); color: var(--forest); }
.response-chip.no { background: var(--danger-soft); color: var(--danger); }
.response-chip.maybe { background: var(--amber-soft); color: var(--amber); }
.response-chip.open { background: #edf0ee; color: var(--muted); }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.player-card { display: flex; align-items: center; gap: 13px; padding: 17px; }
.player-card-button { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.player-card-button:hover, .player-card-button:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(11,44,107,.14); outline: 2px solid var(--lime); outline-offset: 2px; }
.player-card .avatar { width: 44px; height: 44px; }
.player-card .player-copy { min-width: 0; }
.player-card strong, .player-card small { display: block; }
.player-card small { margin-top: 4px; color: var(--muted); }
.player-card .player-positions { color: var(--ink); font-weight: 750; }
.player-card .kit-sizes { color: var(--forest); font-size: 11px; font-weight: 750; }
.shirt-number { margin-left: auto; color: #c8d0cb; font-size: 28px; font-weight: 900; }
.empty-state { padding: 50px 24px; text-align: center; }
.empty-state .empty-icon { font-size: 42px; }
.empty-state h2 { margin: 12px 0 6px; }
.empty-state p { max-width: 420px; margin: 0 auto; color: var(--muted); }

.dialog { width: min(530px, calc(100% - 28px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 22px; box-shadow: 0 30px 90px rgba(9,29,21,.3); }
.dialog::backdrop { background: rgba(9,29,21,.58); backdrop-filter: blur(3px); }
.dialog form { display: grid; gap: 16px; padding: 25px; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.dialog-header h2 { margin: 4px 0 0; letter-spacing: -.035em; }
.dialog label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.dialog input, .dialog select, .dialog textarea { width: 100%; min-height: 45px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); font: inherit; outline: none; }
.dialog textarea { padding-block: 11px; resize: vertical; }
.dialog input:focus, .dialog select:focus, .dialog textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(21,71,154,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
.compact-dialog { width: min(430px, calc(100% - 28px)); }
.muted { color: var(--muted); }
.role-option { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: white; text-align: left; cursor: pointer; }
.role-option:hover { border-color: #aab9b0; background: #f7f9f7; }
.role-option strong, .role-option small { display: block; }
.role-option small { margin-top: 3px; color: var(--muted); }
.attendance-list { display: grid; gap: 9px; max-height: 360px; overflow-y: auto; padding-right: 3px; }
.attendance-row { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; }
.attendance-row strong, .attendance-row small { display: block; }
.attendance-row strong { color: var(--ink); }
.attendance-row small { margin-top: 3px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 28px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #dfe4ee; cursor: pointer; transition: .18s ease; }
.switch span::after { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 2px 5px rgba(20,33,61,.2); content: ""; transition: .18s ease; }
.switch input:checked + span { background: var(--forest-2); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--lime); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(380px, calc(100% - 30px)); padding: 13px 16px; border-radius: 12px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.integration-settings { display: grid; gap: 14px; }
.integration-settings label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 750; }
.integration-settings input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); }
.integration-actions, .import-head, .import-row, .import-row-actions { display: flex; align-items: center; gap: 10px; }
.integration-actions { flex-wrap: wrap; }
.integration-actions .muted { margin-left: auto; font-size: 12px; }
.import-head { justify-content: space-between; margin: 28px 0 12px; }
.import-head h3, .import-head p { margin: 0; }
.import-head p { margin-top: 4px; }
.import-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.import-row { justify-content: space-between; padding: 15px; border-bottom: 1px solid var(--line); }
.import-row:last-child { border-bottom: 0; }
.import-select { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; min-width: 0; cursor: pointer; }
.import-select input { margin-top: 4px; accent-color: var(--forest); }
.import-select strong, .import-select small { display: block; }
.import-select small { margin-top: 4px; color: var(--muted); }
.import-row-actions { flex: 0 0 auto; }
.import-empty { padding: 24px; }
.import-history { margin-top: 18px; color: var(--muted); }
.import-history summary { cursor: pointer; font-weight: 750; }
.import-history li { margin: 7px 0; }

@media (max-width: 980px) {
  .sidebar { width: 218px; }
  .main-content { margin-left: 218px; }
  #view { padding-inline: 25px; }
  .hero-grid, .content-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { background: white; }
  .integration-actions .muted { width: 100%; margin-left: 0; }
  .import-head, .import-row { align-items: stretch; flex-direction: column; }
  .import-row-actions { justify-content: flex-end; }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    padding: 8px 17px;
    border-bottom: 1px solid var(--line);
    background: rgba(11,44,107,.97);
    color: white;
  }
  .mobile-header .crest { width: 37px; height: 42px; font-size: 11px; }
  .mobile-header .brand strong { font-size: 15px; }
  .mobile-header .avatar { width: 36px; height: 36px; }
  #view { padding: 23px 16px 36px; }
  .page-head { align-items: start; margin-bottom: 20px; }
  .page-head h1 { font-size: 29px; }
  .page-head p { font-size: 13px; }
  .page-head .button span.label { display: none; }
  .page-head .button { width: 44px; padding: 0; font-size: 21px; }
  .hero-grid { display: block; }
  .event-hero { min-height: 330px; margin-inline: -16px; padding: 26px 20px; border-radius: 0 0 27px 27px; }
  .event-hero h2 { margin-top: 18px; font-size: 34px; }
  .rsvp-group { display: grid; grid-template-columns: repeat(3, 1fr); }
  .rsvp-button { padding: 0 10px; }
  .hero-grid > .card { margin-top: 16px; }
  .section { margin-top: 25px; }
  .section-heading h2 { font-size: 20px; }
  .schedule-row { grid-template-columns: 47px 1fr; gap: 12px; padding: 16px 13px; }
  .schedule-row .type-badge { display: none; }
  .schedule-row .response-chip { display: none; }
  .schedule-row > .button { grid-column: 2; justify-self: start; }
  .event-actions { grid-column: 2; }
  .team-signal, .organization-grid { grid-template-columns: 1fr; }
  .wide-dialog { width: calc(100vw - 16px); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong { font-size: 24px; }
  .content-grid { display: block; }
  .content-grid > * + * { margin-top: 15px; }
  .team-grid { grid-template-columns: 1fr; gap: 10px; }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
  }
  .mobile-nav .nav-link { display: grid; min-height: 55px; place-items: center; gap: 1px; padding: 3px; border-radius: 10px; color: var(--muted); font-size: 10px; }
  .mobile-nav .nav-link.active { background: var(--lime-soft); color: var(--forest); box-shadow: none; }
  .mobile-nav .nav-icon { font-size: 20px; line-height: 1; }
  .dialog { margin-block: auto 10px; width: calc(100% - 16px); max-height: calc(100% - 25px); border-radius: 22px; }
  .dialog form { padding: 21px 17px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .toast { right: 15px; bottom: calc(83px + env(safe-area-inset-bottom)); }
}

@media (max-width: 820px) {
  .auth-screen { display: block; background: linear-gradient(180deg, var(--forest) 0 145px, white 145px); }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; align-items: start; padding: 24px 18px 45px; }
  .auth-box { margin-top: 14px; padding: 24px 20px 28px; border-radius: 22px; background: white; box-shadow: 0 16px 44px rgba(11,44,107,.18); }
  .auth-mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; color: var(--forest); }
  .auth-mobile-brand .crest { width: 43px; height: 49px; }
  .auth-mobile-brand strong { font-size: 18px; }
  .auth-box h2 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
