:root {
  font-family: var(--font-family, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  color: var(--text, #0a1628);
  background: var(--surface, #f4f7fb);
  --navy: #08111f;
  --blue: #0a7cff;
  --green: #20b96b;
  --red: #ec4d4d;
  --muted: #718096;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface, #f4f7fb); }
button, input, select, textarea { font: inherit; }
.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--surface-raised, #fff); box-shadow: 0 0 30px #00152a12; }
.top { background: var(--navy); color: white; padding: 22px 20px 18px; position: sticky; top: 0; z-index: 3; }
.brand { font-weight: 900; letter-spacing: .16em; }
.sub { opacity: .65; font-size: 12px; margin-top: 3px; }
.view { padding: 18px 16px 96px; }
.card { background: var(--surface-raised, #fff); border: 1px solid #e7edf5; border-radius: var(--card-radius, 18px); padding: 16px; margin-bottom: 14px; box-shadow: 0 8px 24px #10233c0d; }
.hero { background: var(--navy); background: linear-gradient(145deg, var(--navy), color-mix(in srgb, var(--navy) 74%, var(--blue))); color: #fff; border: none; }
.tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.title { font-size: 22px; font-weight: 850; margin: 6px 0; }
.section-title { font-size: 18px; font-weight: 850; margin: 20px 2px 10px; }
.meta { color: var(--muted); font-size: 14px; line-height: 1.45; }
.hero .meta { color: #c7d3df; }
.row { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.btn { border: 0; border-radius: 13px; padding: 13px 14px; font-size: 15px; font-weight: 750; cursor: pointer; background: #edf3fa; color: #13233a; }
.btn.compact { padding: 9px 11px; font-size: 13px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.yes { background: var(--green); color: #fff; flex: 1; }
.btn.no { background: #fff0f0; color: var(--red); flex: 1; }
.btn.reserve { background: #fff7e8; color: #986000; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.count { background: #f5f8fc; border-radius: 12px; text-align: center; padding: 10px 5px; }
.count b { display: block; font-size: 20px; }
.count span { font-size: 11px; color: var(--muted); }
.event { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.event-title { display: block; font-weight: 800; margin: 5px 0; }
.event.canceled { opacity: .62; }
.team-label { margin-left: 7px; color: var(--blue); font-size: 11px; font-weight: 800; }
.date { width: 52px; text-align: center; background: #eef5ff; border-radius: 13px; padding: 8px 3px; color: var(--blue); }
.date b { display: block; font-size: 20px; }
.grow { flex: 1; }
.small { font-size: 12px; color: var(--muted); }
.member-status { font-weight: 750; margin: 10px 0; }
.member-status.yes { color: var(--green); }
.member-status.reserve { color: #986000; }
.attendance-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.form { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #34455d; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #d6deea; border-radius: 13px; padding: 13px 14px; background: #fff; color: #13233a; }
textarea { min-height: 92px; resize: vertical; }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 18px; height: 18px; }
.notice { background: #fff7df; border: 1px solid #f2d68b; border-radius: 16px; padding: 15px; margin-bottom: 14px; color: #76520b; }
.loading { color: var(--muted); padding: 32px 8px; text-align: center; }
.top-gap { margin-top: 12px; }
.member-card { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #eaf2ff; color: var(--blue); font-weight: 900; }
.roster-controls { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 70px; gap: 8px; }
.roster-controls select:nth-of-type(2), .roster-controls button { grid-column: 1 / -1; }
.request-card { display: flex; gap: 8px; align-items: center; }
.request-card .btn { flex: 0 0 auto; }
.two-columns { display: grid; gap: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; padding: 6px 9px; background: #edf3fa; color: #42536a; font-size: 12px; }
.empty { border: 1px dashed #cad5e2; border-radius: var(--card-radius, 18px); color: var(--muted); padding: 24px; text-align: center; }
.calendar-tools { margin: 10px 0 14px; }
.adapter-fields { display: grid; gap: 10px; border-radius: 14px; background: #f5f8fc; padding: 13px; }
.absence-btn, .attendance-save { width: 100%; margin-top: 12px; }
.attendance-item small { display: block; color: var(--muted); margin-top: 3px; }
.attendance-item select { width: 126px; padding: 8px; }
.formation-entry { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.formation-entry .btn { flex: 0 0 auto; }
.formation-group { border: 1px solid #dfe7f2; border-radius: 15px; padding: 13px; background: #f8faff; }
.formation-slots { display: grid; gap: 9px; margin-top: 10px; }
.formation-slots label { grid-template-columns: 76px 1fr; align-items: center; font-size: 13px; }
.formation-slots select { padding: 10px 11px; min-width: 0; }
.formation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; position: sticky; bottom: 72px; background: var(--surface-raised, #fff); padding: 8px 0; z-index: 2; }
.formation-actions .btn:disabled { opacity: .45; cursor: default; }
.add-group { width: 100%; border: 1px dashed #b9c7d8; }
.formation-position { font-size: 52px; line-height: 1; font-weight: 950; letter-spacing: -.04em; margin: 24px 0 10px; }
.personal-formation { min-height: 260px; display: flex; flex-direction: column; justify-content: center; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); padding: 9px 6px calc(9px + env(safe-area-inset-bottom)); background: #fff; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #e7edf5; z-index: 5; }
.nav button { border: 0; background: none; padding: 10px 4px; color: var(--muted); font-size: 12px; }
.nav button.active { color: var(--blue); font-weight: 800; }
.nav-count { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:3px; padding:0 4px; border-radius:9px; background:var(--red); color:white; font-size:10px; font-weight:800; }
.notification-card { text-align:left; width:100%; cursor:pointer; }
.notification-card.unread { border-left:4px solid var(--blue); }
.notification-card .notification-time { font-size:12px; color:var(--muted); white-space:nowrap; }
.notification-actions { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0; }
.feature-grid { display:grid; gap:10px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.feature-card { width:100%; display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; text-align:left; cursor:pointer; }
.feature-card .meta { display:block; margin-top:4px; }
.chat-thread { display:flex; flex-direction:column; gap:8px; margin:14px 0; }
.chat-message { margin:0; max-width:88%; }
.chat-message.mine { align-self:flex-end; border-color:color-mix(in srgb,var(--blue) 35%,#e3eaf4); }
.chat-compose { position:sticky; bottom:76px; }
.poll-option { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:8px; padding:10px 0; border-bottom:1px solid #edf1f6; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { padding:8px; text-align:left; border-bottom:1px solid #edf1f6; white-space:nowrap; }
@media (max-width:360px){.feature-grid{grid-template-columns:1fr}.nav button{font-size:10px}}
button,input,select,textarea,a { min-height:44px; }
:focus-visible { outline:3px solid color-mix(in srgb,var(--blue) 70%,white); outline-offset:2px; }
.offline-banner { position:fixed; top:8px; left:50%; transform:translateX(-50%); z-index:20; padding:8px 14px; border-radius:18px; background:#3b4658; color:white; font-size:12px; }
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.hidden { display: none !important; }
@media (max-width: 350px) { .counts { grid-template-columns: repeat(2, 1fr); } .view { padding-inline: 12px; } .formation-actions { grid-template-columns: 1fr; } }
