/* FootballAI · tema condiviso */
:root{color-scheme:dark;--bg:#0c1016;--surface:#141b24;--raised:#1b2531;--line:#2b3848;--text:#edf3f8;--muted:#a4b2c2;--accent:#69e1bc;--ink:#09251d}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0!important;background:var(--bg)!important;color:var(--text)!important;font:15px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif!important}
h1,h2,h3{color:var(--text);line-height:1.25;letter-spacing:-.025em}
h1{font-size:clamp(25px,3vw,34px)!important}h2{font-size:20px}h3{font-size:17px}
p{overflow-wrap:anywhere}a{color:var(--accent)}a:hover{text-decoration:underline}
button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}
button,.button,.button-analysis,.fai-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:10px 16px!important;border-radius:9px!important;border:1px solid var(--line)!important;background:var(--raised)!important;color:var(--text)!important;font:600 14px/1.35 system-ui!important;text-decoration:none!important;cursor:pointer;white-space:normal}
button:hover,.button:hover,.button-analysis:hover,.fai-button:hover{border-color:var(--accent)!important;opacity:1}
button[type=submit],.fai-primary,#uploadButton,#save,#mark,#set-start,#set-end,#export{background:var(--accent)!important;color:var(--ink)!important;border-color:var(--accent)!important}
button:disabled{opacity:.42!important;cursor:not-allowed}
.delete-button,.button-danger{background:#382129!important;color:#ffb8bf!important;border-color:#76414d!important}
.button-warning,.warning{color:#ffda9a!important;background:#302819!important}
.active,.success{color:#83e7bc!important}.inactive,.error,.upload-error{color:#ffb5be!important}
input,select,textarea{min-width:0;max-width:100%;padding:11px 12px!important;border:1px solid #3c4b5e!important;border-radius:8px!important;background:#0e151e!important;color:var(--text)!important;font:inherit!important}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{width:100%}
input[type=checkbox],input[type=radio]{accent-color:var(--accent);width:18px;height:18px}
input::placeholder,textarea::placeholder{color:#8595a9!important}
input[type=file]::file-selector-button{padding:7px 10px;margin-right:12px;background:var(--raised);color:var(--text);border:1px solid var(--line);border-radius:5px}
label{color:#d7e1ec!important;font-size:13px;font-weight:600}
:focus-visible{outline:2px solid var(--accent)!important;outline-offset:4px}
.container,.analysis-container,body>main{width:100%;max-width:1440px!important;margin:auto!important;padding:30px 28px!important}
.card,.card-analysis,.panel,.login-box,.box{background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:14px!important;box-shadow:none!important;min-width:0}
.card,.panel{padding:24px}.card{margin-bottom:20px}
.grid{gap:18px}.field{margin-bottom:18px}
.muted,.time-help,.subscription-info,.footer{color:var(--muted)!important}
.empty-state{border:1px dashed var(--line)!important;border-radius:10px;background:transparent!important;color:var(--muted)!important}
table{width:100%;border-collapse:collapse}td,th{border-bottom:1px solid var(--line)!important;padding:13px 12px!important;color:inherit}
th{text-align:left;color:var(--muted)!important;font-size:12px;font-weight:600}
thead{background:#101720!important}tbody tr:hover{background:#192330}
.error,.upload-error{background:#36212a!important;border:1px solid #6e3b49!important}
.current,.credential{background:var(--raised)!important;border:1px solid var(--line)!important;border-radius:9px}
.progress-track{background:#283543!important;height:7px!important}.progress-bar{background:var(--accent)!important}
.hidden{display:none!important}
.fai-nav{border-bottom:1px solid var(--line);background:#101720;padding:0 28px}
.fai-nav-inner{max-width:1384px;margin:auto;display:flex;align-items:center;gap:26px;min-height:76px;flex-wrap:wrap}
.fai-brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);font-size:19px;font-weight:750;text-decoration:none!important;white-space:nowrap}
.fai-emblem{display:grid;place-items:center;background:var(--accent);color:var(--ink);font-size:12px;font-weight:850;width:34px;height:34px;border-radius:9px;letter-spacing:-.03em}
.fai-links{display:flex;gap:6px;align-items:center;flex-wrap:wrap;flex:1}
.fai-links a,.fai-account a{padding:9px 12px;border-radius:7px;color:var(--muted);text-decoration:none;font-size:13px;font-weight:600}
.fai-links a[aria-current=page]{color:var(--accent);background:#1b302b}
.fai-links a:hover,.fai-account a:hover{color:var(--text);background:var(--raised)}
.fai-account{display:flex;align-items:center;gap:10px;font-size:13px}.fai-account span{color:var(--muted)}
.fai-page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:4px 0 28px}.fai-page-heading h1{margin:0 0 8px}.fai-page-heading p{color:var(--muted);margin:0}
.fai-eyebrow{display:block;color:var(--accent);font-size:11px;text-transform:uppercase;letter-spacing:.16em;font-weight:700;margin-bottom:10px}
.fai-card-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}.fai-card-heading h2{margin:0}.fai-card-heading p{margin:5px 0 0;color:var(--muted);font-size:13px}
.fai-count,.fai-badge{display:inline-block;border:1px solid #344558;background:#1a2735;color:#cad8e9;padding:4px 10px;font-size:12px;font-weight:600;border-radius:30px;white-space:nowrap}
.fai-matches{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}
.fai-match{border:1px solid var(--line);border-radius:12px;padding:20px;background:#101720;display:flex;flex-direction:column;gap:16px;min-width:0}
.fai-match h3{font-size:20px;margin:0}.fai-match h3 span{color:#8395aa;font-weight:400;font-size:14px;display:block;margin:4px 0}
.fai-match p{margin:0;color:var(--muted);font-size:13px}.fai-match-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
.fai-file{font-size:12px!important;overflow-wrap:anywhere}.fai-upload{max-width:none}.fai-note{color:var(--muted);font-size:13px}
.fai-admin-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.fai-table-scroll{overflow-x:auto;max-width:100%}
.fai-admin-layout .card{margin:0}
.fai-admin-layout details summary{cursor:pointer;color:var(--muted);font-weight:600}
.fai-admin-layout details[open] summary{margin-bottom:15px}
.fai-archive{border-left:3px solid var(--accent)!important}#box-history{display:block;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.fai-archive #box-status{margin:10px 0} .fai-archive h2{font-size:16px}
.fai-auth .login-box,.fai-auth>.container,.fai-auth>.box{width:min(440px,calc(100% - 32px));max-width:440px!important}
.fai-auth{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:30px 0}
.fai-auth>.container{padding:0!important}.fai-auth .brand h1{color:var(--accent)}
.fai-auth .card{padding:30px}
.fai-theme .topbar,.fai-theme .nav,.fai-theme .actions,.header-actions{flex-wrap:wrap}
.fai-theme .form-row{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.fai-theme .championship-row{border-color:var(--line)!important}
.fai-theme .analysis-header p,.fai-theme .panel-header p{color:var(--muted)}
.fai-theme .workspace{grid-template-columns:230px minmax(0,1fr)}
.fai-theme .events-panel{min-height:300px}
.fai-theme .match-selector select{min-width:0!important}
.fai-theme .panel-header,.fai-theme .video-header{border-color:var(--line)!important;background:transparent!important}
.fai-theme .video-player{background:#080b10!important}
.fai-theme .viewer{top:18px}.fai-theme .viewer video{border:1px solid var(--line);border-radius:12px 12px 0 0}
.fai-theme .transport{background:var(--surface);border:1px solid var(--line);border-top:0}
.fai-theme .editor{grid-template-columns:minmax(0,1.35fr) minmax(340px,1fr)}
.fai-theme .time-row input{min-height:42px}
.fai-theme .time-row label{min-width:100px}
.fai-theme #jobs p{border-color:var(--line)}
.fai-lab-summary{cursor:pointer;font-weight:650;color:var(--accent);padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:16px}
.fai-future{border:1px solid var(--line);padding:16px;border-radius:12px;margin-top:20px;color:var(--muted)}
.fai-future summary{cursor:pointer;font-weight:600}
.fai-theme .analysis-grid{margin-top:16px}
.fai-theme .event-list .empty-state{margin:16px}
@media(max-width:1050px){.fai-nav-inner{gap:12px;padding:14px 0}.fai-account{margin-left:auto}.fai-links{order:3;flex-basis:100%}.fai-admin-layout{grid-template-columns:1fr}}
@media(max-width:850px){.fai-theme .workspace,.fai-theme .editor{grid-template-columns:1fr}.fai-theme .events-panel{min-height:0}.fai-theme .viewer{position:static}.fai-theme .analysis-grid{grid-template-columns:1fr}.fai-theme .match-selector-top{flex-direction:column;align-items:stretch}.fai-theme .analysis-header{align-items:start}.fai-theme .events-panel{order:2}.fai-theme .video-area{order:1}}
@media(max-width:600px){.container,.analysis-container,body>main{padding:20px 16px!important}.fai-nav{padding:0 16px}.card,.panel{padding:18px!important}.fai-nav-inner{gap:10px}.fai-account span{display:none}.fai-links{gap:0}.fai-links a{padding:8px 9px;font-size:12px}.fai-page-heading{flex-direction:column;align-items:start;gap:12px}.fai-page-heading .fai-button{width:100%}.fai-matches{grid-template-columns:minmax(0,1fr)}.fai-theme .grid{grid-template-columns:1fr}.fai-card-heading{align-items:start}.fai-theme .set-piece-categories,.fai-theme .technical-sections{grid-template-columns:1fr 1fr}.fai-theme .topbar{align-items:start}.fai-theme .time-row{gap:7px}.fai-theme .analysis-container{overflow-wrap:anywhere}}
/* Preserve contrast of status text inserted by existing scripts. */
.fai-theme [style*="color:#067647"],.fai-theme [style*="color: #067647"]{color:#83e7bc!important}
.fai-theme [style*="color:#b42318"],.fai-theme [style*="color: #b42318"]{color:#ffb5be!important}
.fai-theme [style*="color:#a11919"]{color:#ffb5be!important}
.fai-theme [style*="color:#126237"]{color:#83e7bc!important}
.fai-theme [style*="color:#667085"],.fai-theme [style*="color: #667085"]{color:var(--muted)!important}
