:root{--bg: #f5f6f8;--surface: #ffffff;--surface-2: #f7f8fa;--border: #e3e5ea;--line: #cfd3da;--text: #1c1f24;--muted: #787c84;--primary: #2f6feb;--primary-weak: #eef3fd;--success: #1f9d57;--success-weak: #eaf6ef;--danger: #c2410c;--radius: 10px;--radius-sm: 7px;--font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.5;font-size:15px;-webkit-font-smoothing:antialiased}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}input,select{font-family:inherit;font-size:14px}h1,h2,h3,h4{font-weight:600;line-height:1.25}.app{display:flex;flex-direction:column;min-height:100%}.app-main{width:100%;max-width:1120px;margin:0 auto;padding:20px 16px 48px;flex:1}.app-header{position:sticky;top:0;z-index:20;background:var(--surface);border-bottom:1px solid var(--border)}.header-row,.header-tabs{max-width:1120px;margin:0 auto}.header-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 0}.brand h1{font-size:17px;font-weight:700;letter-spacing:-.01em}.brand p{font-size:12px;color:var(--muted);margin-top:1px}.header-actions{display:flex;gap:8px}.hbtn{font-size:13px;font-weight:500;color:var(--muted);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:6px 11px;transition:background .12s ease,color .12s ease,border-color .12s ease}.hbtn:hover{color:var(--text)}.hbtn.active{color:var(--primary);background:var(--primary-weak);border-color:#c5d8fb}.segmented{display:inline-flex;gap:2px;background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:3px}.header-tabs{display:flex;flex-wrap:wrap;gap:8px;padding:12px 16px}.segmented button{font-size:13px;font-weight:500;color:var(--muted);padding:6px 18px;border-radius:999px;transition:background .12s ease,color .12s ease}.segmented button.active{background:var(--surface);color:var(--text);font-weight:600;box-shadow:0 1px 2px #00000014}.segmented.small button{padding:4px 13px;font-size:12px}.error-banner{background:#fdf1ec;color:var(--danger);border:1px solid #f3d6c8;border-radius:var(--radius-sm);padding:9px 12px;font-size:13px;margin-bottom:14px}.loading,.empty{text-align:center;padding:36px 16px;color:var(--muted);font-size:14px}.section{margin-bottom:26px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.section-title{font-size:15px;font-weight:700;margin-bottom:12px}.section-head .section-title{margin-bottom:0}.group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.group-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.group-card-header{width:100%;display:flex;align-items:center;justify-content:space-between;padding:11px 13px;background:var(--surface-2);border-bottom:1px solid var(--border)}.group-name{font-weight:600;font-size:14px}.group-card-meta{display:flex;align-items:center;gap:9px}.count-badge{font-size:12px;font-weight:600;color:var(--muted)}.chevron{color:var(--muted);font-size:11px}.group-card-body{padding:9px;display:flex;flex-direction:column;gap:8px}.game-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:11px 12px}.game-card.is-completed{border-color:#d4e9dd}.game-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.game-label{font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--muted)}.status{font-size:11px;font-weight:600;padding:2px 8px;border-radius:999px}.status-pending{background:var(--surface-2);color:var(--muted)}.status-done{background:var(--success-weak);color:var(--success)}.game-players{display:flex;flex-direction:column;gap:2px}.player{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 0}.player-name{font-size:14px;font-weight:500}.player-score{font-size:16px;font-weight:700;color:var(--muted);min-width:16px;text-align:right}.player.winner .player-name{font-weight:700}.player.winner .player-score{color:var(--success)}.game-times{margin-top:9px;padding-top:8px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:2px}.time-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12.5px}.time-label{color:var(--muted)}.time-value{color:var(--text);font-variant-numeric:tabular-nums}.time-row.is-actual .time-value{color:var(--success);font-weight:600}.time-row.is-estimate .time-value{color:var(--muted)}.game-card-actions{margin-top:9px}.link-btn{font-size:13px;font-weight:500;color:var(--primary);padding:2px 0}.link-btn:hover{text-decoration:underline}.btn-primary,.btn-secondary{border-radius:var(--radius-sm);font-size:14px;font-weight:600;padding:9px 16px;transition:background .12s ease,opacity .12s ease}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover:not(:disabled){background:#2a62cf}.btn-secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover:not(:disabled){background:#eef0f3}.btn-primary:disabled,.btn-secondary:disabled{opacity:.5;cursor:not-allowed}.edit-form{margin-top:10px;padding-top:11px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:14px}.modal-body .edit-form{margin-top:0;padding-top:0;border-top:none}.edit-section h4{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--muted);margin-bottom:8px}.edit-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:9px}.edit-row label,.notif-row label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:500;color:var(--muted);flex:1;min-width:130px}.edit-row input,.edit-row select,.notif-row input,.notif-row select{padding:8px 9px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text)}.edit-row input:focus,.edit-row select:focus,.notif-row input:focus,.notif-row select:focus{outline:2px solid var(--primary);outline-offset:-1px}.hint{font-size:12px;color:var(--muted);margin-top:6px}.form-message{font-size:13px;color:var(--primary);background:var(--primary-weak);border-radius:var(--radius-sm);padding:7px 10px}.bracket{display:flex;gap:12px;overflow-x:auto;padding-bottom:4px}.bracket-round{flex:0 0 270px;display:flex;flex-direction:column;gap:8px}.bracket-round-title{font-size:13px;font-weight:600;color:var(--muted);padding-bottom:6px;border-bottom:1px solid var(--border)}.bracket-tree{display:flex;align-items:stretch;overflow-x:auto;padding-bottom:8px}.bracket-col{flex:0 0 auto;display:flex;flex-direction:column}.bracket-col-head{height:32px;line-height:32px;text-align:center;font-size:12px;font-weight:600;color:var(--muted)}.bracket-col-body{flex:1;display:flex;flex-direction:column}.bracket-cell{width:176px;flex:1;display:flex;align-items:center;position:relative;padding:8px 0}.bracket-col:not(:last-child) .bracket-cell:after{content:"";position:absolute;left:158px;width:18px;box-sizing:border-box}.bracket-col:not(:last-child) .bracket-cell:nth-child(odd):after{top:50%;height:50%;border-top:2px solid var(--line);border-right:2px solid var(--line)}.bracket-col:not(:last-child) .bracket-cell:nth-child(2n):after{bottom:50%;height:50%;border-bottom:2px solid var(--line);border-right:2px solid var(--line)}.match-box{width:158px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;text-align:left;display:block}.match-box.is-clickable{transition:border-color .12s ease,box-shadow .12s ease}.match-box.is-clickable:hover{border-color:var(--primary);box-shadow:0 1px 4px #2f6feb2e}.match-head{display:flex;justify-content:space-between;align-items:center;padding:4px 8px;background:var(--surface-2);border-bottom:1px solid var(--border);font-size:11px;color:var(--muted)}.match-code{font-weight:700;color:var(--text)}.match-time{font-variant-numeric:tabular-nums}.match-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;font-size:13px}.match-row+.match-row{border-top:1px solid var(--border)}.match-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.match-score{font-weight:700;color:var(--muted);min-width:14px;text-align:right}.match-row.winner .match-name{font-weight:700}.match-row.winner .match-score{color:var(--success)}.third-place{margin-top:16px;display:flex;flex-direction:column;gap:6px;width:max-content}.third-place-label{font-size:12px;font-weight:600;color:var(--muted)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#14181e73;display:flex;align-items:center;justify-content:center;padding:16px;z-index:50}.modal{background:var(--surface);border-radius:var(--radius);width:100%;max-width:440px;max-height:88vh;overflow-y:auto;box-shadow:0 16px 40px #00000047}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface)}.modal-head h3{font-size:15px;font-weight:700}.modal-close{font-size:22px;line-height:1;color:var(--muted);padding:0 4px}.modal-body{padding:16px}.admin-panel,.notif-setup{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:16px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}.stat{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 10px;display:flex;flex-direction:column;gap:1px}.stat-accent{background:var(--primary-weak);border-color:#c5d8fb}.stat-value{font-size:19px;font-weight:700}.stat-accent .stat-value{color:var(--primary)}.stat-label{font-size:11px;font-weight:500;color:var(--muted)}.progress-bar{margin-top:12px;height:7px;background:var(--surface-2);border-radius:999px;overflow:hidden}.progress-fill{height:100%;background:var(--primary);transition:width .4s ease}.notif-intro{font-size:13px;color:var(--muted);margin-bottom:12px}.notif-row{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}.notif-actions{display:flex;flex-wrap:wrap;gap:8px}.notif-current{margin-top:10px;font-size:13px}.app-footer{border-top:1px solid var(--border);background:var(--surface);padding:14px 16px;text-align:center;font-size:12px;color:var(--muted)}.timetable{display:flex;flex-direction:column;gap:6px}.tt-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--line);border-radius:var(--radius-sm);padding:9px 12px}.tt-row.is-done{border-left-color:var(--success)}.tt-row.is-clickable{transition:border-color .12s ease}.tt-row.is-clickable:hover{border-color:var(--primary)}.tt-time{display:flex;flex-direction:column;flex:0 0 58px}.tt-start{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.tt-end{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}.tt-end.is-actual{color:var(--success);font-weight:600}.tt-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tt-label{font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:uppercase;color:var(--muted)}.tt-players{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.tt-winner{font-weight:700}.tt-vs{color:var(--muted)}.tt-result{flex:0 0 auto}.tt-score{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}.tt-open{font-size:12px;color:var(--muted)}@media (max-width: 600px){.brand h1{font-size:15px}.header-row{flex-wrap:wrap}.group-grid{grid-template-columns:1fr}.app-main{padding:16px 12px 40px}}
