:root {
  --navy: #101247;
  --navy-dark: #080a2c;
  --red: #ed1c24;
  --green: #13a36d;
  --bg: #f4f6fa;
  --card: #fff;
  --text: #182033;
  --muted: #718096;
  --line: #e5e9f0;
  --shadow: 0 12px 35px rgba(21, 31, 52, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 75% 15%, #27318a 0, var(--navy) 38%, var(--navy-dark) 100%); }
.login-card { width: min(100%, 410px); padding: 34px; border-radius: 28px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.3); text-align: center; }
.login-card img { width: 88px; height: 88px; object-fit: contain; }
.mode-badge { display: table; margin: 8px auto 14px; border-radius: 999px; padding: 6px 10px; background: #e8fff6; color: #087b50; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.login-card h1 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.login-card > p { margin: 8px 0 22px; color: var(--muted); font-size: 13px; }
.login-card label { display: grid; gap: 6px; margin-top: 12px; color: #4b5567; font-size: 11px; font-weight: 800; text-align: left; }
.login-card input { width: 100%; border: 1px solid var(--line); border-radius: 13px; outline: 0; padding: 13px 14px; background: #f8fafc; }
.login-card input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(16,18,71,.1); }
.login-card button { width: 100%; margin-top: 16px; border: 0; border-radius: 13px; padding: 14px; background: var(--navy); color: #fff; font-weight: 850; }
.login-card small { display: block; margin-top: 13px; color: #9aa3b2; font-size: 10px; }
.login-card .login-error { min-height: 17px; margin: 9px 0 -5px; color: #c71821; font-weight: 750; }

.admin-shell { min-height: 100vh; }
.admin-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 270px; flex-direction: column; padding: 24px 16px; background: linear-gradient(180deg, var(--navy), var(--navy-dark)); color: #fff; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.admin-brand img { width: 52px; height: 52px; object-fit: contain; }
.admin-brand span { display: grid; line-height: 1.05; }
.admin-brand small { color: #aeb5de; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.admin-brand strong { font-size: 17px; text-transform: uppercase; }
.local-pill { display: flex; align-items: center; gap: 7px; margin: 24px 8px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 8px 11px; color: #d4d8ee; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.local-pill b { width: 8px; height: 8px; border-radius: 50%; background: #45e6a7; box-shadow: 0 0 0 4px rgba(69,230,167,.13); }
.admin-sidebar nav { display: grid; gap: 5px; margin-top: 9px; }
.admin-sidebar nav button { display: flex; align-items: center; gap: 13px; border: 0; border-radius: 13px; padding: 13px 14px; background: transparent; color: #c4c9e5; font-size: 13px; font-weight: 750; text-align: left; }
.admin-sidebar nav button i { display: grid; width: 22px; place-items: center; color: #aeb5de; font-size: 17px; font-style: normal; }
.admin-sidebar nav button.is-active { background: rgba(0,0,0,.28); color: #fff; }
.admin-sidebar nav button.is-active i { color: #ff7378; }
.sidebar-links { display: grid; gap: 5px; margin-top: auto; padding: 10px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-links a, .sidebar-links button { border: 0; padding: 7px 0; background: none; color: #b9bfdc; font-size: 11px; text-align: left; }
.sidebar-links button { color: #ff9296; cursor: pointer; }
.mobile-admin-header { display: none; }

.admin-main { min-height: 100vh; margin-left: 270px; padding: 42px clamp(24px, 4vw, 62px); }
.admin-section { display: none; max-width: 1250px; margin: 0 auto; }
.admin-section.is-active { display: block; animation: appear .2s ease; }
@keyframes appear { from { opacity: .35; transform: translateY(5px); } }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.admin-heading span, .admin-card header span { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.admin-heading h1 { margin: 5px 0; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.04em; }
.admin-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.last-update { color: var(--muted) !important; white-space: nowrap; }
.primary-action { border: 0; border-radius: 12px; padding: 12px 16px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 850; box-shadow: 0 8px 18px rgba(16,18,71,.2); }
.heading-actions { display: flex; gap: 8px; }
.secondary-action { border: 1px solid var(--navy); border-radius: 12px; padding: 11px 15px; background: #fff; color: var(--navy); font-size: 12px; font-weight: 850; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 128px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.metric-card::after { content: ""; position: absolute; width: 70px; height: 70px; top: -22px; right: -18px; border-radius: 50%; background: var(--tone, #eef1ff); }
.metric-card span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 12px; font-size: 32px; letter-spacing: -.05em; }
.metric-card small { color: var(--muted); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-top: 16px; }
.admin-card, .data-card { border: 1px solid var(--line); border-radius: 21px; background: var(--card); box-shadow: var(--shadow); }
.admin-card { padding: 20px; }
.admin-card > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-card header h2 { margin: 3px 0 0; font-size: 19px; }
.admin-card header button, .admin-card header a { border: 0; background: none; color: var(--navy); font-size: 11px; font-weight: 850; }
.dashboard-match, .dashboard-leader { display: grid; align-items: center; gap: 9px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.dashboard-match:last-child, .dashboard-leader:last-child { border-bottom: 0; }
.dashboard-match { grid-template-columns: 1fr auto 1fr; }
.dashboard-match span:last-child { text-align: right; }
.dashboard-match strong { padding: 7px 9px; border-radius: 9px; background: #f1f3f8; }
.dashboard-leader { grid-template-columns: 24px 34px 1fr auto; }
.dashboard-leader > b { color: var(--navy); text-align: center; }
.dashboard-leader img { width: 32px; height: 32px; object-fit: contain; }
.dashboard-leader em { color: var(--muted); font-style: normal; }
.dashboard-leader em strong { color: var(--text); font-size: 16px; }

.toolbar { display: flex; gap: 12px; margin-bottom: 14px; }
.toolbar label { display: grid; flex: 1; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.toolbar input, .toolbar select { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; outline: 0; padding: 9px 12px; background: #fff; color: var(--text); }
.toolbar input:focus, .toolbar select:focus { border-color: var(--navy); }
.responsive-table { overflow-x: auto; }
.round-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; scrollbar-width: thin; }
.round-tabs button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fff; color: #687386; font-size: 10px; font-weight: 800; }
.round-tabs button.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 14px; color: var(--muted); font-size: 9px; text-align: left; text-transform: uppercase; }
td { padding: 13px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.team-cell { display: flex; align-items: center; gap: 9px; min-width: 145px; font-weight: 750; }
.team-cell img { width: 31px; height: 31px; object-fit: contain; }
.score-cell { font-size: 15px; font-weight: 900; white-space: nowrap; }
.match-discipline-mini { display: flex; gap: 5px; margin-top: 5px; }
.match-discipline-mini span { border-radius: 6px; padding: 3px 5px; background: #f7f8fa; color: #657083; font-size: 8px; font-weight: 850; }
.match-discipline-mini .yellow { background: #fff8d8; color: #806100; }
.match-discipline-mini .red { background: #fff0f1; color: #b31822; }
.status-chip { display: inline-flex; border-radius: 999px; padding: 6px 8px; background: #eef1f6; color: #657083; font-size: 9px; font-weight: 850; white-space: nowrap; }
.status-chip.final { background: #e5fbf1; color: #087c50; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions button, .row-actions a { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: #fff; color: var(--navy); font-size: 10px; font-weight: 800; white-space: nowrap; }
.row-actions .delete { color: #c5222a; }
.empty-row { padding: 34px; color: var(--muted); text-align: center; }

.team-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.team-admin-card { display: grid; grid-template-columns: 65px 1fr; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow); }
.team-admin-card img { width: 64px; height: 64px; object-fit: contain; }
.team-admin-card h2 { margin: 0; font-size: 15px; }
.team-admin-card p { margin: 4px 0 10px; color: var(--muted); font-size: 10px; }
.team-admin-card button, .team-admin-card a { display: inline-flex; border: 0; border-radius: 9px; padding: 7px 10px; background: #eef0f8; color: var(--navy); font-size: 10px; font-weight: 850; }
.backup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ranking-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.ranking-card > header b { font-size: 22px; }
.ranking-card.yellow > header b { color: #f3c83f; }
.ranking-card.red > header b { color: #ed1c24; }
.ranking-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.ranking-row:last-child { border-bottom: 0; }
.ranking-row > b { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #eef0f6; color: #687386; font-size: 10px; }
.ranking-row:first-child > b { background: var(--navy); color: #fff; }
.ranking-row span { display: grid; min-width: 0; }
.ranking-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-row small { color: var(--muted); font-size: 9px; }
.ranking-row em { font-size: 17px; font-style: normal; font-weight: 900; }
.ranking-empty { padding: 24px 5px; color: var(--muted); font-size: 11px; text-align: center; }
.backup-card b { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; background: #eef0fa; color: var(--navy); font-size: 24px; }
.backup-card h2 { margin: 18px 0 6px; }
.backup-card p { min-height: 40px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.backup-card button, .file-button { display: inline-flex; border: 0; border-radius: 10px; padding: 10px 12px; background: var(--navy); color: #fff; font-size: 10px; font-weight: 850; cursor: pointer; }
.file-button input { display: none; }
.backup-card.danger b { background: #fff0f1; color: #c5222a; }
.backup-card.danger button { background: #c5222a; }

.thumbnail-workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: start; gap: 18px; }
.thumbnail-controls { display: grid; gap: 14px; position: sticky; top: 24px; }
.thumbnail-controls label { display: grid; gap: 6px; color: #525d70; font-size: 10px; font-weight: 850; }
.thumbnail-controls select, .thumbnail-controls input { width: 100%; border: 1px solid var(--line); border-radius: 11px; outline: 0; padding: 11px 12px; background: #f8fafc; color: var(--text); }
.thumbnail-controls p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.thumbnail-controls .secondary-action { width: 100%; }
.thumbnail-theme-field { display: grid; gap: 7px; }
.thumbnail-theme-field > span { color: #525d70; font-size: 10px; font-weight: 850; }
.thumbnail-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.thumbnail-theme { min-height: 70px; overflow: hidden; position: relative; display: grid; align-content: end; justify-items: start; gap: 2px; border: 2px solid transparent; border-radius: 12px; padding: 9px; color: #fff; text-align: left; cursor: pointer; box-shadow: inset 0 -34px 28px rgba(0,0,0,.48); transition: transform .18s ease, border-color .18s ease; }
.thumbnail-theme:hover { transform: translateY(-2px); }
.thumbnail-theme.is-active { border-color: #fff; outline: 3px solid rgba(218,24,35,.24); }
.thumbnail-theme b { font-size: 16px; line-height: 1; }
.thumbnail-theme small { font-size: 8px; font-weight: 900; }
.thumbnail-theme.theme-blue { background: linear-gradient(145deg,#071428,#0879ba); }
.thumbnail-theme.theme-red { background: linear-gradient(145deg,#080808,#e11424); }
.thumbnail-theme.theme-gold { background: linear-gradient(145deg,#071328,#bc8723); }
.thumbnail-theme.theme-editorial { background: linear-gradient(145deg,#052a3b,#b92730); }
.thumbnail-preview-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #0a0d20; box-shadow: var(--shadow); }
.thumbnail-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; background: #fff; }
.thumbnail-preview-head span { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.thumbnail-preview-head strong { color: var(--muted); font-size: 9px; }
#youtube-thumbnail { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #080a2c; }

.edit-dialog { width: min(92vw, 720px); border: 0; border-radius: 24px; padding: 0; background: #fff; color: var(--text); box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.edit-dialog.match-control-dialog { width: min(96vw, 1180px); max-height: 94vh; }
.match-control-dialog, .match-control-dialog input, .match-control-dialog select, .match-control-dialog textarea, .match-control-dialog button { font-family: Calibri, "Segoe UI", sans-serif; }
.match-control-dialog { font-size: 12px; }
.match-control-dialog form { max-height: 94vh; overflow: auto; }
.match-control-dialog h2 { font-size: 27px; }
.match-control-dialog header > div > span { font-size: 12px; }
.match-control-dialog .form-grid > label { font-size: 12px; }
.match-control-dialog .form-grid > label > input,
.match-control-dialog .form-grid > label > select,
.match-control-dialog .form-grid > label > textarea { font-size: 12px; }
.score-auto-note { display: block; margin-top: 5px; color: #6b7689; font-size: 11px; font-weight: 700; line-height: 1.25; }
.edit-dialog::backdrop { background: rgba(4,7,28,.7); backdrop-filter: blur(4px); }
.edit-dialog form { padding: 24px; }
.edit-dialog header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.edit-dialog header span { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.edit-dialog h2 { margin: 4px 0 0; }
.edit-dialog header button { border: 0; background: none; color: #677083; font-size: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.form-grid label { display: grid; gap: 6px; color: #525d70; font-size: 10px; font-weight: 800; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 11px; outline: 0; padding: 11px 12px; background: #f8fafc; color: var(--text); resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(16,18,71,.08); }
.form-section-title { grid-column: 1 / -1; margin-top: 5px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--navy); font-size: 12px; font-weight: 900; }
.player-events-section { grid-column: 1 / -1; margin-top: 4px; border-top: 1px solid var(--line); padding-top: 17px; }
.player-events-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.player-events-heading span { color: var(--red); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.player-events-heading h3 { margin: 3px 0 0; color: var(--navy); font-size: 22px; }
.player-events-heading p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }
.match-event-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.event-team-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #f8fafc; }
.event-team-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--navy); color: #fff; }
.event-team-head img { width: 31px; height: 31px; object-fit: contain; }
.event-team-head span { display: grid; gap: 1px; }
.event-team-head strong { font-size: 15px; }
.event-team-head small { color: rgba(255,255,255,.7); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.event-player-head, .event-player-row { display: grid; grid-template-columns: minmax(175px, 1fr) 62px 62px 62px; align-items: center; }
.event-player-head { min-height: 39px; padding: 0 9px; border-bottom: 1px solid var(--line); color: #6d7586; font-size: 12px; font-weight: 900; text-align: center; text-transform: uppercase; }
.event-player-head span:first-child { text-align: left; }
.event-player-row { min-height: 57px; padding: 7px 9px; border-bottom: 1px solid var(--line); background: #fff; }
.event-player-row.is-own-goal-row { background: #fff8eb; border-bottom: 2px solid #f2d59b; }
.event-player-row.is-own-goal-row .own-goal-badge { background: #f3c969; color: #3d2800; font-weight: 900; }
.event-stat-disabled { display: flex; align-items: center; justify-content: center; color: #b5becd; font-size: 13px; font-weight: 700; }
.event-player-row:last-child { border-bottom: 0; }
.red-sanction-fields { grid-column: 1 / -1; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 9px; margin: 8px 0 2px; padding: 10px; border: 1px solid #f3b7bc; border-radius: 10px; background: #fff5f5; }
.red-sanction-fields[hidden] { display: none !important; }
.red-sanction-fields label { display: grid; gap: 4px; color: #8c1520; font-size: 12px; font-weight: 850; }
.red-sanction-fields label span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.red-sanction-fields label small { color: #8b6470; font-size: 10px; font-weight: 700; }
.red-sanction-fields input { width: 100%; min-width: 0; height: 36px; border: 1px solid #e6a3a9; border-radius: 8px; padding: 5px 8px; background: #fff; color: var(--text); font: inherit; }
.event-player-ident { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; }
.event-player-ident > b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; background: #eef1f6; color: var(--navy); font-size: 12px; }
.event-player-ident > span { min-width: 0; }
.event-player-ident strong, .event-player-ident small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-player-ident strong { color: var(--text); font-size: 13px; }
.event-player-ident small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.event-stat { display: flex !important; justify-content: center; }
.event-stat input { width: 50px !important; height: 36px; padding: 4px !important; border-radius: 8px !important; background: #f5f7fa !important; font-size: 12px; font-weight: 900; text-align: center; }
.event-stat.goal input:focus { border-color: #16875d; box-shadow: 0 0 0 3px rgba(22,135,93,.12); }
.event-stat.yellow input { border-bottom: 3px solid #f0c300; }
.event-stat.red input { border-bottom: 3px solid #dc1f2b; }
.event-roster-empty { margin: 0; padding: 27px 16px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.match-event-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.match-event-summary span { border-radius: 999px; padding: 7px 11px; background: #eef1f6; color: #4c576a; font-size: 12px; font-weight: 850; }
.match-event-summary span.is-warning { background: #fff1d9; color: #9a5b00; }
.match-event-summary span.is-ok { background: #e9f8f1; color: #08734e; }
.round-builder-dialog { width: min(96vw, 1020px); }
.round-builder-dialog form { max-height: 92vh; overflow: auto; }
.round-basics { margin-bottom: 20px; }
.round-match-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 17px; }
.round-match-heading strong { color: var(--navy); font-size: 14px; }
.round-match-heading .secondary-action { padding: 8px 11px; font-size: 10px; }
.round-match-list { display: grid; gap: 9px; margin-top: 11px; }
.round-match-row { display: grid; grid-template-columns: 142px 92px minmax(0, 1fr) 34px minmax(0, 1fr) 36px; align-items: end; gap: 8px; border: 1px solid var(--line); border-radius: 13px; padding: 11px; background: #f8fafc; }
.round-match-row label { display: grid; gap: 5px; color: #525d70; font-size: 10px; font-weight: 800; }
.round-match-row input, .round-match-row select { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; background: #fff; color: var(--text); }
.round-match-row > span { align-self: center; padding-top: 17px; color: var(--red); font-size: 10px; font-weight: 950; text-align: center; }
.round-match-row .remove-round-match { align-self: center; margin-top: 17px; border: 0; border-radius: 9px; width: 34px; height: 34px; background: #fff0f1; color: #bd1c27; font-size: 18px; font-weight: 800; }
.edit-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.edit-dialog footer button { border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; background: #fff; color: var(--text); font-size: 11px; font-weight: 850; }
.edit-dialog footer .save-button { border-color: var(--navy); background: var(--navy); color: #fff; }
.dialog-intro { margin: -7px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.import-controls { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.import-controls > label { display: grid; gap: 6px; color: #525d70; font-size: 10px; font-weight: 800; }
.import-controls select { border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: #f8fafc; }
.import-controls small { color: var(--muted); font-weight: 500; }
.drop-file { place-content: center; min-height: 95px; border: 2px dashed #cbd1dc; border-radius: 14px; padding: 14px; background: #f8fafc; text-align: center; cursor: pointer; }
.drop-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-file span { color: var(--navy); font-size: 11px; }
.template-link { display: inline-block; margin: 12px 0; color: var(--navy); font-size: 10px; font-weight: 850; }
.template-button { align-self: end; cursor: pointer; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff; text-align: center; }
.fixture-import-controls { grid-template-columns: 1fr auto; align-items: end; }
.fixture-valid-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 15px; border-bottom: 1px solid var(--line); background: #effaf5; color: #17603d; font-size: 11px; }
.fixture-import-errors { padding: 16px 18px; color: #9d1722; font-size: 11px; line-height: 1.5; }
.fixture-import-errors ul { margin: 8px 0 0; padding-left: 18px; }
.import-preview { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #fafbfc; }
.import-preview > p { margin: 0; padding: 28px; color: var(--muted); font-size: 11px; text-align: center; }
.import-preview table { background: #fff; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 330px; border-radius: 12px; padding: 12px 15px; background: #162033; color: #fff; box-shadow: 0 14px 35px rgba(0,0,0,.25); font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .team-admin-grid { grid-template-columns: repeat(2, 1fr); }
  .backup-grid { grid-template-columns: 1fr; }
  .ranking-grid { grid-template-columns: 1fr; }
  .thumbnail-workspace { grid-template-columns: 1fr; }
  .thumbnail-controls { position: static; grid-template-columns: repeat(2, 1fr); }
  .thumbnail-controls p { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .admin-sidebar { width: min(82vw, 290px); transform: translateX(-102%); transition: transform .2s ease; }
  body.menu-open .admin-sidebar { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .mobile-admin-header { position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
  .mobile-admin-header button { border: 0; background: none; font-size: 21px; }
  .mobile-admin-header span { font-size: 13px; font-weight: 850; }
  .mobile-admin-header a { color: var(--navy); font-size: 10px; font-weight: 850; }
  .admin-main { margin-left: 0; padding: 24px 14px 50px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .team-admin-grid { grid-template-columns: 1fr; }
  .thumbnail-controls { grid-template-columns: 1fr; }
  .thumbnail-controls p { grid-column: auto; }
  .match-event-teams { grid-template-columns: 1fr; }
  .player-events-heading { align-items: start; flex-direction: column; gap: 6px; }
  .player-events-heading p { text-align: left; }
  .round-match-row { grid-template-columns: 125px 82px minmax(0, 1fr) 28px minmax(0, 1fr) 34px; }
}
@media (max-width: 520px) {
  .login-card { padding: 26px 20px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 112px; padding: 15px; }
  .metric-card strong { font-size: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .import-controls { grid-template-columns: 1fr; }
  .fixture-import-controls { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .player-events-section { grid-column: auto; }
  .event-player-head, .event-player-row { grid-template-columns: minmax(130px, 1fr) 52px 52px 52px; }
  .red-sanction-fields { grid-template-columns: 1fr; }
  .round-match-row { grid-template-columns: 1fr 34px; align-items: end; }
  .round-match-row label { grid-column: 1 / -1; }
  .round-match-row > span { display: none; }
  .round-match-row .remove-round-match { grid-column: 2; }
}
.admin-season-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding: 15px 18px; border: 1px solid #cbd7ec; border-radius: 16px; background: linear-gradient(135deg, #101247, #1f3d78); color: #fff; box-shadow: 0 10px 24px rgba(16,18,71,.15); }
.admin-season-bar > div { display: grid; gap: 3px; }
.admin-season-bar span, .admin-season-bar label { font-size: 11px; font-weight: 700; }
.admin-season-bar strong { font-size: 21px; }
.admin-season-bar label { display: grid; gap: 5px; min-width: 220px; }
.admin-season-bar select { min-height: 40px; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 7px 10px; background: #fff; color: #171a32; font: inherit; }
@media (max-width: 700px) { .admin-season-bar { align-items: stretch; flex-direction: column; } .admin-season-bar label { min-width: 0; } }
