*,*:before,*:after{box-sizing:border-box}:root{--sidebar-w: 240px;--sidebar-bg: #16162a;--sidebar-hover: #1e1e38;--sidebar-active: #26264a;--sidebar-border: rgba(255, 255, 255, .06);--sidebar-text: #8892b0;--sidebar-bright: #ccd6f6;--accent: #6366f1;--accent-hover: #4f46e5;--accent-soft: rgba(99, 102, 241, .18);--green: #10b981;--amber: #f59e0b;--red: #ef4444;--blue: #0ea5e9;--bg: #0f1115;--surface: #181b21;--surface-soft: #232732;--border: #2a2f3a;--text: #e7e9ee;--text-muted: #9ca3af;--shadow-sm: 0 1px 3px rgba(0, 0, 0, .4), 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 4px 18px rgba(0, 0, 0, .5);--radius: 8px;--radius-sm: 6px}html,body,#root{min-height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:14px;letter-spacing:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}h1,h2,h3,p{margin:0}svg{width:16px;height:16px}.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(135deg,#0b0d13,#16162a)}.auth-card{width:100%;max-width:400px;padding:36px;border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-md)}.init-spinner{width:36px;height:36px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.auth-logo,.sidebar-logo{color:var(--text);font-size:30px;font-weight:800;line-height:1}.auth-logo{margin-bottom:8px}.auth-subtitle{margin-bottom:26px;color:var(--text-muted);font-size:16px;font-weight:600}.auth-switch{margin-top:16px;color:var(--text-muted);font-size:13px;text-align:center}.auth-switch button{border:0;background:transparent;color:var(--accent);font-weight:700}.form-row{display:grid;gap:6px;margin-bottom:14px}.form-row span{color:var(--text-muted);font-size:12px;font-weight:700;text-transform:uppercase}.form-row input,.inline-input,.select{width:100%;min-height:42px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);padding:9px 11px}.form-row input:focus,.inline-input:focus,.select:focus{border-color:var(--accent);outline:0}.password-field{position:relative}.password-field input{padding-right:46px}.password-toggle{position:absolute;top:50%;right:6px;transform:translateY(-50%)}.form-error{min-height:20px;margin-bottom:12px;color:var(--red);font-size:13px;font-weight:600}.app{min-height:100vh;display:flex}.sidebar{width:var(--sidebar-w);display:flex;flex-shrink:0;flex-direction:column;background:var(--sidebar-bg);color:var(--sidebar-text)}.sidebar-header{padding:44px 16px 26px;border-bottom:1px solid var(--sidebar-border)}.sidebar-logo{color:#fff;text-align:center}.sidebar-nav{display:grid;gap:4px;padding:10px 8px}.nav-item{width:100%;display:flex;align-items:center;gap:9px;min-height:40px;border:0;border-radius:var(--radius-sm);background:transparent;color:var(--sidebar-text);padding:8px 10px;text-align:left;transition:background .15s,color .15s}.nav-item:hover{background:var(--sidebar-hover);color:var(--sidebar-bright)}.nav-item.active{background:var(--sidebar-active);color:#fff}.nav-icon{display:flex;opacity:.8}.nav-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-badge{min-width:24px;border-radius:999px;background:#ffffff1f;color:var(--sidebar-bright);padding:1px 7px;font-size:12px;text-align:center}.sidebar-footer{margin-top:auto;display:flex;align-items:center;gap:10px;padding:14px;border-top:1px solid var(--sidebar-border)}.sidebar-user{min-width:0;display:flex;flex:1;align-items:center;gap:8px}.sidebar-user span{overflow:hidden;color:#fff;font-weight:650;text-overflow:ellipsis;white-space:nowrap}.avatar,.player-avatar{width:34px;height:34px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:50%;background:var(--accent);color:#fff;font-size:12px;font-weight:800}.main{width:100%;min-width:0;padding:24px}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:72px;margin-bottom:18px}.eyebrow{margin-bottom:5px;color:var(--text-muted);font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase}.topbar h1{font-size:30px;line-height:1}.content-grid,.score-layout{display:grid;grid-template-columns:minmax(310px,380px) minmax(0,1fr);gap:18px}.score-layout{grid-template-columns:minmax(0,1fr) minmax(300px,420px)}.panel,.score-panel,.history-panel,.empty-state{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm)}.panel,.score-panel,.history-panel{padding:18px}.panel.wide,.panel.full{min-width:0}.section-head{display:flex;align-items:start;justify-content:space-between;gap:14px;margin-bottom:16px}.section-head h2{font-size:20px;line-height:1.1}.section-head.compact{margin-bottom:12px}.btn,.icon-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:var(--radius-sm);font-weight:750;transition:background .15s,border-color .15s,color .15s}.btn{min-height:42px;gap:8px;padding:9px 13px}.btn.block{width:100%}.btn.primary{background:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-hover)}.btn.secondary{border-color:var(--border);background:var(--surface);color:var(--text)}.btn.secondary:hover,.icon-button.quiet:hover{background:var(--surface-soft)}.icon-button{width:36px;height:36px;padding:0;border-color:var(--border);background:var(--surface);color:var(--text)}.icon-button.quiet{background:transparent}.icon-button.danger{color:var(--red)}.sidebar-logout{border-color:#ffffff14;background:#ffffff14;color:var(--sidebar-bright)}.toast{position:fixed;top:14px;left:50%;z-index:20;transform:translate(-50%);border-radius:var(--radius);background:var(--text);color:#fff;padding:10px 14px;box-shadow:var(--shadow-md);font-weight:700}.empty-state{min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--text-muted);text-align:center}.empty-state svg{width:34px;height:34px;color:var(--accent)}.empty-state h2{color:var(--text);font-size:22px}.score-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}.team-card{min-height:172px;display:grid;align-content:center;gap:8px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-soft);color:var(--text);padding:18px;text-align:left}.team-card.active{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.team-card.leading{background:#10b98124}.team-card span{color:var(--text-muted);font-size:13px;font-weight:800;text-transform:uppercase}.team-card strong{font-size:58px;line-height:.95}.team-card small{color:var(--text-muted);font-size:14px;font-weight:650}.score-entry{display:grid;gap:14px}.segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:hidden;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-soft)}.segmented button{min-height:42px;border:0;background:transparent;color:var(--text-muted);font-weight:750}.segmented button.active{background:var(--accent);color:#fff}.score-grid{display:grid;grid-template-columns:repeat(7,minmax(54px,1fr));gap:8px}.score-chip{min-height:44px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text);font-weight:800}.score-chip.active{border-color:var(--accent);background:var(--accent-soft);color:#c7d2fe}.action-row{display:flex;flex-wrap:wrap;gap:8px}.finished-strip{display:flex;align-items:center;gap:10px;border:1px solid rgba(16,185,129,.26);border-radius:var(--radius);background:#10b98114;padding:12px;color:#34d399;font-weight:750}.finished-strip span{flex:1;min-width:0}.hand-list,.game-list,.player-list{display:grid;gap:8px}.hand-row,.game-row,.player-row{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);padding:10px}.hand-row{min-height:52px}.hand-index{width:42px;color:var(--text-muted);font-weight:700}.team-pill{border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}.team-a{background:#6366f11f;color:#c7d2fe}.team-b{background:#f59e0b29;color:#fbbf24}.hand-row strong{margin-left:auto;font-size:18px}.muted-panel{border:1px dashed var(--border);border-radius:var(--radius);background:var(--surface-soft);color:var(--text-muted);padding:16px;text-align:center}.game-form,.player-form,.teams-form-grid{display:grid;gap:12px}.team-select{display:grid;gap:8px;margin:0;border:1px solid var(--border);border-radius:var(--radius);padding:12px}.team-select legend{padding:0 5px;color:var(--text-muted);font-size:12px;font-weight:800;text-transform:uppercase}.game-row,.player-row{align-items:flex-start;justify-content:space-between}.game-main,.player-main{min-width:0}.game-main h3,.player-main h3{margin-bottom:4px;font-size:16px}.game-main p,.player-main p{color:var(--text-muted);font-size:13px}.player-main{display:flex;align-items:center;gap:10px}.row-actions{display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end;gap:6px}.color-picker{display:flex;flex-wrap:wrap;gap:8px}.color-picker.compact{align-items:center;max-width:146px}.color-swatch{width:28px;height:28px;border:2px solid transparent;border-radius:999px}.color-swatch.active{border-color:var(--text);box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--accent)}.stats-table-wrap{overflow-x:auto}.stats-table{width:100%;min-width:820px;border-collapse:collapse}.stats-table th,.stats-table td{border-bottom:1px solid var(--border);padding:12px 10px;text-align:left}.stats-table th{color:var(--text-muted);font-size:12px;text-transform:uppercase}.table-player{display:inline-flex;align-items:center;gap:8px;font-weight:750}.player-avatar.mini{width:28px;height:28px;font-size:10px}@media (max-width: 980px){.app{flex-direction:column}.sidebar{width:100%}.sidebar-header{padding:18px 16px}.sidebar-logo{text-align:left}.sidebar-nav{grid-template-columns:repeat(4,minmax(0,1fr));padding:8px}.nav-item{justify-content:center}.nav-label{flex:0 1 auto}.sidebar-footer{display:none}.content-grid,.score-layout{grid-template-columns:1fr}}@media (max-width: 680px){.main{padding:16px}.topbar{min-height:56px}.topbar h1{font-size:24px}.sidebar-nav{grid-template-columns:repeat(2,minmax(0,1fr))}.score-board{grid-template-columns:1fr}.score-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.game-row,.player-row,.finished-strip{flex-direction:column;align-items:stretch}.row-actions{justify-content:flex-start}}
