:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --surface-muted: #f7f9fd;
  --text: #152449;
  --text-soft: #6d7e9f;
  --text-faint: #93a1bc;
  --blue: #1459d9;
  --blue-strong: #0b4fc9;
  --blue-soft: #dfeaff;
  --green: #169b65;
  --green-soft: #def6e9;
  --red: #d95558;
  --red-soft: #ffe5e6;
  --amber: #dc941c;
  --amber-soft: #fff2cf;
  --border: #dfe7f4;
  --border-strong: #c6d4eb;
  --shadow: 0 8px 28px rgba(34, 68, 130, 0.07);
  --shadow-soft: 0 2px 10px rgba(34, 68, 130, 0.05);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 244px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(20, 89, 217, .24); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 10; width: var(--sidebar-width); display: flex; flex-direction: column;
  padding: 24px 14px 18px; background: rgba(255,255,255,.96); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: white; background: linear-gradient(145deg, #2e80f2, #104fc8); box-shadow: 0 8px 18px rgba(20, 89, 217, .22); font-weight: 850; font-size: 21px; }
.brand-copy { font-size: 14px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.brand-copy span { display: block; color: var(--blue); }
.role-badge { margin: 0 10px 20px; padding: 9px 11px; border: 1px solid #cfe0ff; border-radius: 10px; color: var(--blue); background: #f0f5ff; font-size: 12px; font-weight: 750; }
.nav { display: grid; gap: 4px; }
.nav-section-label { margin: 6px 12px 8px; color: var(--text-faint); font-size: 10px; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; color: var(--text); background: transparent; text-align: left; font-size: 13px; font-weight: 650; transition: .18s ease; }
.nav-item:hover { background: var(--surface-soft); color: var(--blue); }
.nav-item.active { color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(20,89,217,.18); }
.nav-item .icon { color: var(--text-soft); }
.nav-item.active .icon { color: white; }
.nav-item .nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 20px; color: white; background: var(--red); font-size: 10px; font-weight: 800; }
.sidebar-spacer { flex: 1; }
.sidebar-foot { margin-top: 12px; padding: 13px 12px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.sidebar-foot strong { display: block; color: var(--text); font-size: 12px; }

.main-area { width: calc(100% - var(--sidebar-width)); min-width: 0; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 8; height: 72px; display: flex; align-items: center; gap: 18px; padding: 0 30px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.88); backdrop-filter: blur(14px); }
.breadcrumbs { flex: 1; min-width: 0; color: var(--text-soft); font-size: 12px; font-weight: 650; }
.breadcrumbs strong { color: var(--text); }
.global-search { width: min(360px, 30vw); height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-soft); background: var(--surface-muted); }
.global-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; position: relative; border: 1px solid var(--border); border-radius: 10px; color: var(--text-soft); background: var(--surface); }
.icon-button:hover { color: var(--blue); border-color: #b8cdf0; }
.notification-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px white; }
.profile-button { display: flex; align-items: center; gap: 9px; padding: 2px 0 2px 4px; border: 0; color: var(--text); background: transparent; text-align: left; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: white; background: linear-gradient(145deg,#7da7f5,#185acb); font-size: 11px; font-weight: 800; }
.profile-meta { line-height: 1.15; font-size: 12px; }
.profile-meta strong { display: block; font-size: 12px; }
.profile-meta span { display: block; margin-top: 3px; color: var(--text-soft); font-size: 10px; }

.page { max-width: 1480px; margin: 0 auto; padding: 28px 30px 42px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { color: var(--text); font-size: clamp(26px, 3vw, 34px); line-height: 1.08; letter-spacing: -.04em; }
h2 { font-size: 18px; letter-spacing: -.025em; }
h3 { font-size: 14px; letter-spacing: -.01em; }
.page-subtitle { margin-top: 7px; color: var(--text-soft); font-size: 13px; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; border: 1px solid transparent; border-radius: 10px; color: var(--text); background: white; font-size: 12px; font-weight: 750; transition: .18s ease; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.button-primary { color: white; background: var(--blue); box-shadow: 0 7px 14px rgba(20,89,217,.16); }
.button-primary:hover { background: var(--blue-strong); }
.button-secondary { border-color: var(--border-strong); background: white; }
.button-quiet { color: var(--blue); background: var(--blue-soft); }
.button-danger { color: white; background: var(--red); }
.button:disabled { cursor: not-allowed; opacity: .52; transform: none; box-shadow: none; }
.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-card, .card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-soft); }
.kpi-card { min-height: 126px; padding: 17px 17px 14px; position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; width: 88px; height: 88px; right: -28px; bottom: -38px; border-radius: 50%; background: rgba(20,89,217,.05); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); font-size: 11px; font-weight: 700; }
.kpi-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--blue); background: var(--blue-soft); }
.kpi-value { margin-top: 12px; font-size: 28px; line-height: 1; letter-spacing: -.05em; font-weight: 850; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-soft); font-size: 10px; }
.trend-up { color: var(--green); font-weight: 800; }
.trend-down { color: var(--red); font-weight: 800; }

.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-row .link { border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 750; }
.dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, .8fr); align-items: start; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px 12px; }
.card-header p { margin-top: 4px; color: var(--text-soft); font-size: 11px; }
.card-body { padding: 0 18px 18px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 15px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 11px; }

.chart-card { min-height: 288px; }
.line-chart { width: 100%; height: 198px; display: block; overflow: visible; }
.chart-grid-line { stroke: #e7edf7; stroke-width: 1; }
.chart-label { fill: #8492ac; font-size: 10px; }
.chart-line-blue { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-green { fill: none; stroke: #33ad71; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-area-blue { fill: url(#blueFill); }
.chart-point { fill: white; stroke: var(--blue); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 2px; color: var(--text-soft); font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.legend-dot.green { background: #33ad71; }
.legend-dot.red { background: var(--red); }
.donut-wrap { display: flex; align-items: center; gap: 23px; min-height: 213px; }
.donut { width: 150px; height: 150px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--blue) 0 63%, #49bf7f 63% 82%, #f06a70 82% 94%, #dfe7f4 94% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 23px; border-radius: 50%; background: white; }
.donut-center { z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 24px; letter-spacing: -.05em; }
.donut-center span { color: var(--text-soft); font-size: 10px; }
.stat-list { flex: 1; display: grid; gap: 13px; }
.stat-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; }
.stat-line .label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); }
.stat-line strong { font-size: 12px; }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.mini-dot.green { background: #49bf7f; }
.mini-dot.red { background: #f06a70; }
.mini-dot.gray { background: #b8c5d9; }

.task-list { display: grid; gap: 9px; }
.task-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; }
.task-title { color: var(--text); font-size: 12px; font-weight: 800; }
.task-meta { margin-top: 5px; color: var(--text-soft); font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-active { color: var(--green); background: var(--green-soft); }
.status-planned { color: var(--blue); background: var(--blue-soft); }
.status-draft { color: #856719; background: var(--amber-soft); }
.status-muted { color: var(--text-soft); background: #edf1f7; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e9eef7; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1474ec, #29a9bd); }
.progress-line { display: flex; align-items: center; gap: 9px; min-width: 122px; }
.progress-line small { color: var(--text-soft); font-size: 10px; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { padding: 10px 10px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 10px; font-weight: 750; text-align: left; white-space: nowrap; }
.data-table td { padding: 12px 10px; border-bottom: 1px solid #edf1f7; vertical-align: middle; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: 0; }
.person-cell { display: flex; align-items: center; gap: 8px; }
.person-avatar { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: white; background: #9aa9d4; font-size: 9px; font-weight: 800; }
.person-name strong { display: block; font-size: 11px; }
.person-name span { display: block; margin-top: 2px; color: var(--text-soft); font-size: 9px; }
.metric-good { color: var(--green); font-weight: 800; }
.metric-warn { color: var(--amber); font-weight: 800; }
.metric-bad { color: var(--red); font-weight: 800; }
.score-pill { display: inline-block; min-width: 48px; padding: 4px 7px; border-radius: 7px; color: var(--green); background: var(--green-soft); font-size: 10px; font-weight: 850; text-align: center; }

.notice-list { display: grid; gap: 10px; }
.notice { display: grid; grid-template-columns: 30px 1fr auto; gap: 9px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.notice:last-child { border-bottom: 0; }
.notice-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); }
.notice-title { font-size: 11px; font-weight: 800; }
.notice-copy { margin-top: 4px; color: var(--text-soft); font-size: 10px; line-height: 1.35; }
.notice-time { color: var(--text-faint); font-size: 9px; white-space: nowrap; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-soft); }
.field, .select-field { min-width: 0; display: grid; gap: 6px; }
.field label, .select-field label { color: var(--text-soft); font-size: 10px; font-weight: 750; }
.input, .select, .textarea { width: 100%; min-height: 40px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 11px; color: var(--text); outline: 0; background: white; font-size: 12px; }
.textarea { min-height: 86px; padding: 10px 11px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: #a9bfe2; }
.select { appearance: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7e9f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; padding-right: 33px; }
.field-help { margin-top: 5px; color: var(--text-soft); font-size: 10px; line-height: 1.4; }
.required { color: var(--red); }

.form-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.form-card { padding: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; }
.field-full { grid-column: 1 / -1; }
.requirements { display: flex; flex-wrap: wrap; gap: 8px; }
.requirement { position: relative; }
.requirement input { position: absolute; opacity: 0; pointer-events: none; }
.requirement label { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text-soft); background: white; font-size: 11px; font-weight: 750; cursor: pointer; }
.requirement label::before { content: ""; width: 15px; height: 15px; border: 1px solid #aab9d3; border-radius: 4px; background: white; }
.requirement input:checked + label { border-color: #98b9f4; color: var(--blue); background: #f2f7ff; }
.requirement input:checked + label::before { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m3 8 3 3 7-7'/%3E%3C/svg%3E") center / 11px no-repeat; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.match-panel { position: sticky; top: 88px; }
.match-summary { padding: 12px 18px; border-bottom: 1px solid var(--border); color: var(--text-soft); background: #f8fbff; font-size: 11px; line-height: 1.5; }
.match-summary strong { color: var(--text); }
.match-list { display: grid; gap: 10px; padding: 14px 18px 18px; }
.match-group-title { display: flex; align-items: center; gap: 8px; margin: 3px 0 0; color: var(--text-soft); font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.match-group-title::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.team-match { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: white; transition: .16s ease; }
.team-match:hover { border-color: #a8c2eb; box-shadow: var(--shadow-soft); }
.team-match.selected { border-color: #7ca9f2; background: #f4f8ff; box-shadow: 0 0 0 2px rgba(20,89,217,.07); }
.team-match.disabled { opacity: .58; background: #f7f8fb; }
.team-logo { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: var(--blue-soft); font-size: 11px; font-weight: 850; }
.team-copy strong { display: block; font-size: 12px; }
.team-copy span { display: block; margin-top: 4px; color: var(--text-soft); font-size: 10px; line-height: 1.35; }
.team-score { text-align: right; }
.team-score strong { display: block; color: var(--green); font-size: 15px; }
.team-score span { display: block; margin-top: 3px; color: var(--text-soft); font-size: 9px; }
.team-score .not-available { color: var(--red); font-size: 10px; font-weight: 800; }
.select-toggle { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 6px; color: white; background: white; }
.team-match.selected .select-toggle { border-color: var(--blue); background: var(--blue); }
.team-match.disabled .select-toggle { cursor: not-allowed; }
.explain { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--blue); font-size: 9px; font-weight: 750; }
.invalid-note { margin-top: 6px; color: var(--red); font-size: 9px; line-height: 1.35; }

.roster-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 16px; align-items: start; }
.task-hero { display: grid; grid-template-columns: 58px 1fr auto; gap: 13px; align-items: center; padding: 17px; border: 1px solid #cfe0ff; border-radius: var(--radius-md); background: linear-gradient(110deg, #edf4ff, #ffffff); }
.task-hero-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; color: white; background: linear-gradient(145deg, #297cf0, #104fc8); box-shadow: 0 8px 16px rgba(20,89,217,.18); }
.task-hero h2 { font-size: 19px; }
.task-hero p { margin-top: 5px; color: var(--text-soft); font-size: 11px; }
.task-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; color: var(--text-soft); font-size: 10px; }
.task-hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.roster-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.toolbar-search { flex: 1; max-width: 330px; position: relative; }
.toolbar-search .input { padding-left: 33px; }
.toolbar-search .icon { position: absolute; left: 11px; top: 12px; color: var(--text-faint); }
.toolbar-actions { display: flex; gap: 7px; }
.small-select { min-height: 36px; }
.roster-check { width: 17px; height: 17px; accent-color: var(--blue); }
.row-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; font-size: 10px; font-weight: 800; }
.row-status.confirmed { color: var(--blue); background: var(--blue-soft); }
.row-status.present { color: var(--green); background: var(--green-soft); }
.row-status.declined { color: var(--red); background: var(--red-soft); }
.row-status.empty { color: var(--text-soft); background: #eef2f7; }
.select-status { min-height: 31px; padding: 0 26px 0 8px; border: 1px solid transparent; border-radius: 8px; color: inherit; background: transparent; font-size: 10px; font-weight: 800; }
.status-note { padding: 10px 15px; border-top: 1px solid var(--border); color: var(--text-soft); background: #fbfcfe; font-size: 10px; line-height: 1.45; }
.side-stack { display: grid; gap: 16px; }
.quick-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 18px 18px; }
.quick-stat { padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-muted); }
.quick-stat strong { display: block; font-size: 21px; letter-spacing: -.04em; }
.quick-stat span { display: block; margin-top: 5px; color: var(--text-soft); font-size: 10px; }
.rank-card { padding: 16px 18px; }
.rank-row { display: grid; grid-template-columns: 23px 1fr auto; gap: 8px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: 0; }
.rank-num { color: var(--text-faint); font-size: 11px; font-weight: 800; }
.rank-name { font-size: 11px; font-weight: 800; }
.rank-detail { margin-top: 3px; color: var(--text-soft); font-size: 9px; }
.rank-score { color: var(--blue); font-size: 13px; font-weight: 850; }
.info-note { padding: 12px 13px; border-radius: 10px; color: #49658f; background: #f0f5ff; font-size: 10px; line-height: 1.5; }

.analytics-filter { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 9px; align-items: end; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 16px; margin-top: 16px; }
.rating-table td { padding-top: 10px; padding-bottom: 10px; }
.bar-cell { display: flex; align-items: center; gap: 7px; min-width: 95px; }
.bar-cell .progress { width: 55px; }
.insight-list { display: grid; gap: 12px; padding: 0 18px 18px; }
.insight { display: grid; grid-template-columns: 8px 1fr; gap: 9px; color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.insight::before { content: ""; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--blue); }

.attendance-page { max-width: 900px; }
.mobile-attendance .page { max-width: 600px; padding: 22px 22px 105px; }
.mobile-attendance .sidebar, .mobile-attendance .global-search, .mobile-attendance .breadcrumbs { display: none; }
.mobile-attendance .main-area { width: 100%; margin: 0; }
.mobile-attendance .topbar { height: 64px; padding: 0 18px; justify-content: space-between; }
.mobile-attendance .profile-button { display: none; }
.mobile-attendance .topbar::before { content: "Мы вместе."; color: var(--text); font-size: 14px; font-weight: 850; }
.attendance-back { display: inline-flex; align-items: center; gap: 7px; border: 0; color: var(--blue); background: transparent; font-size: 12px; font-weight: 800; }
.attendance-card { padding: 18px; border-radius: 18px; color: white; background: linear-gradient(135deg,#164eaa,#1268e9); box-shadow: 0 14px 28px rgba(20,89,217,.2); }
.attendance-label { color: #bcd4ff; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.attendance-card h1 { max-width: 470px; margin-top: 9px; color: white; font-size: 27px; }
.attendance-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 15px; color: #e2ecff; font-size: 11px; }
.attendance-meta span { display: inline-flex; align-items: center; gap: 6px; }
.attendance-done { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: white; background: rgba(255,255,255,.13); font-size: 11px; font-weight: 800; }
.attendance-summary { padding: 16px 18px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.summary-head span { color: var(--text-soft); font-size: 11px; }
.summary-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 13px; }
.summary-metric { padding: 12px 8px; border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.summary-metric strong { display: block; font-size: 24px; letter-spacing: -.05em; }
.summary-metric span { display: block; margin-top: 4px; color: var(--text-soft); font-size: 10px; }
.summary-metric.present strong { color: var(--green); }
.summary-metric.confirmed strong { color: var(--blue); }
.summary-metric.declined strong { color: var(--red); }
.attendance-progress { margin-top: 13px; }
.attendance-progress .progress { height: 9px; }
.attendance-progress p { margin-top: 6px; color: var(--text-soft); font-size: 10px; }
.tabbar { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 4px; border-radius: 13px; background: #e9eff9; }
.tab { min-height: 37px; border: 0; border-radius: 10px; color: var(--text-soft); background: transparent; font-size: 11px; font-weight: 800; }
.tab.active { color: var(--blue); background: white; box-shadow: 0 2px 5px rgba(34,68,130,.08); }
.attendance-list { overflow: hidden; margin-top: 16px; }
.attendance-list .card-header { align-items: center; }
.attendance-person { display: grid; grid-template-columns: 39px 1fr auto auto; gap: 10px; align-items: center; padding: 13px 16px; border-top: 1px solid var(--border); }
.attendance-person:first-of-type { border-top: 0; }
.attendance-person .person-avatar { width: 39px; height: 39px; border-radius: 12px; font-size: 12px; }
.attendance-person .person-name strong { font-size: 12px; }
.attendance-person .person-name span { font-size: 10px; }
.status-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 9px; border: 0; border-radius: 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-button.present { color: #117a50; background: var(--green-soft); }
.status-button.confirmed { color: var(--blue); background: var(--blue-soft); }
.status-button.declined { color: var(--red); background: var(--red-soft); }
.status-button.empty { color: var(--text-soft); background: #eef2f7; }
.attendance-menu { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; color: var(--text-soft); background: transparent; }
.attendance-save { position: fixed; z-index: 12; bottom: 16px; left: 50%; width: min(560px, calc(100% - 32px)); transform: translateX(-50%); box-shadow: 0 10px 24px rgba(20,89,217,.24); }
.bottom-nav { display: none; }

.toast-region { position: fixed; z-index: 30; top: 85px; right: 25px; display: grid; gap: 8px; width: min(340px, calc(100% - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 12px 13px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: white; box-shadow: 0 13px 30px rgba(34,68,130,.16); animation: toast-in .22s ease-out; font-size: 11px; line-height: 1.4; }
.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast-icon { flex: 0 0 auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
.skeleton { min-height: 14px; border-radius: 5px; background: linear-gradient(90deg,#edf2fa 25%,#f9fbff 50%,#edf2fa 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { padding: 38px 18px; color: var(--text-soft); text-align: center; }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 14px; }

.icon { width: 17px; height: 17px; display: inline-block; flex: 0 0 auto; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 21px; height: 21px; }

@media (max-width: 1120px) {
  :root { --sidebar-width: 214px; }
  .page, .topbar { padding-left: 22px; padding-right: 22px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid, .analytics-grid { grid-template-columns: 1fr; }
  .analytics-filter { grid-template-columns: repeat(2, 1fr); }
  .analytics-filter .button { align-self: end; }
}
@media (max-width: 820px) {
  :root { --sidebar-width: 0px; }
  .sidebar { display: none; }
  .main-area { width: 100%; margin-left: 0; padding-bottom: 76px; }
  .topbar { height: 62px; padding: 0 16px; }
  .breadcrumbs { display: none; }
  .global-search { width: 100%; max-width: 420px; margin-right: auto; }
  .top-actions { gap: 7px; }
  .profile-meta { display: none; }
  .page { padding: 22px 16px 32px; }
  .page-header { display: block; margin-bottom: 18px; }
  .header-actions { margin-top: 14px; }
  .form-layout, .roster-layout { grid-template-columns: 1fr; }
  .match-panel { position: static; }
  .bottom-nav { position: fixed; z-index: 11; left: 0; right: 0; bottom: 0; height: 68px; display: grid; grid-template-columns: repeat(4,1fr); padding: 7px 10px 4px; border-top: 1px solid var(--border); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
  .bottom-nav button { display: grid; place-items: center; gap: 2px; border: 0; color: var(--text-soft); background: transparent; font-size: 9px; font-weight: 750; }
  .bottom-nav button.active { color: var(--blue); }
}
@media (max-width: 560px) {
  .topbar { gap: 9px; }
  .global-search { max-width: none; }
  .kpi-card { min-height: 112px; padding: 13px; }
  .kpi-value { font-size: 24px; }
  .card-header { padding: 15px 14px 11px; }
  .card-body { padding: 0 14px 15px; }
  .card-footer { padding-left: 14px; padding-right: 14px; }
  .donut-wrap { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 15px; padding-top: 10px; }
  .stat-list { width: 100%; }
  .form-card { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .task-hero { grid-template-columns: 44px 1fr; }
  .task-hero-icon { width: 44px; height: 44px; border-radius: 12px; }
  .task-hero .status { grid-column: 2; justify-self: start; }
  .roster-toolbar { display: grid; }
  .toolbar-search { max-width: none; width: 100%; }
  .toolbar-actions { justify-content: flex-end; }
  .data-table { min-width: 690px; }
  .analytics-filter { grid-template-columns: 1fr; }
  .analytics-filter .button { width: 100%; }
  .attendance-person { grid-template-columns: 39px 1fr auto; }
  .attendance-person .attendance-menu { grid-column: 3; grid-row: 1; }
  .attendance-person .status-button { grid-column: 2 / -1; justify-self: start; }
  .summary-metric strong { font-size: 21px; }
}
