/* CA Scout Studio · Maç merkezi ve çalışma alanı gezinmesi.
   Yalnızca görünümü değiştirir; mevcut tasarım sistemi renk ve boşluk değişkenlerini kullanır.
   index.html, collections.html ve opponent.html içinde design-system.css'ten sonra yüklenir. */

/* ---- Çalışma alanları gezinmesi (Maç merkezi · Video koleksiyonları · Rakip analizi) ---- */
.workspace-nav{gap:4px;margin:0 0 28px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:0;border:0;border-bottom:1px solid #22324a;border-radius:0;background:transparent;width:100%}
.workspace-nav a{position:relative;display:inline-flex;align-items:center;padding:12px 16px;border-radius:0;background:transparent;color:#9caec5;font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap;transition:color var(--motion-fast)}
.workspace-nav a>span{display:none}
.workspace-nav a:hover{color:#e8f1f8;background:transparent}
.workspace-nav a[aria-current=page]{color:#fff;background:transparent}
.workspace-nav a[aria-current=page]::after{content:"";position:absolute;left:12px;right:12px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--color-primary)}

/* ---- Üst şerit: kullanıcı ve araç düğmeleri aynı ölçüde ---- */
#appHeader .header-actions{gap:8px}
#appHeader .header-actions .header-button,#appHeader .header-actions button{height:36px;padding:0 14px;border-radius:8px;border:1px solid #324059;background:#182238;color:#e8f1f8;font-size:13px;font-weight:600}
#appHeader .header-actions .header-button:hover,#appHeader .header-actions button:hover:not(:disabled){background:#22304b;border-color:#46597a}
#appHeader .header-actions button.primary{background:var(--color-primary);border-color:var(--color-primary);color:#062c39}
#appHeader .header-actions button.primary:hover:not(:disabled){background:var(--color-primary-hover)}
#appHeader .user-badge{flex:0 0 auto;width:fit-content;padding:6px 12px;margin:0 8px 0 0;border:1px solid #2b3d58;border-radius:999px;background:#111a2e;color:#b1c3d7;font-size:12px}

/* ---- Maç merkezi: başlık ve arşiv özeti ---- */
#dashboard .dashboard-title{align-items:flex-end;gap:24px;flex-wrap:wrap;margin:4px auto 24px;max-width:1450px}
#dashboard .dashboard-title h1{font-size:30px;line-height:1.15;margin:0 0 6px;letter-spacing:-.01em}
#dashboard .dashboard-title p{margin:0;font-size:15px}
.dashboard-stats{display:flex;gap:0;margin:0}
.dashboard-stats>div{display:flex;flex-direction:column-reverse;padding:0 24px;border-left:1px solid #22324a}
.dashboard-stats>div:first-child{border-left:0}
.dashboard-stats dt{color:#8fa6c3;font-size:12px}
.dashboard-stats dd{margin:0 0 2px;color:#f1f6ff;font-size:26px;font-weight:650;line-height:1.1;font-variant-numeric:tabular-nums}

/* ---- Filtreler: soldaki kolon yerine liste üstünde tek satır ---- */
#dashboard .dashboard-layout{grid-template-columns:1fr;gap:16px}
#dashboard .dashboard-sidebar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px 16px;align-items:end;padding:16px 20px}
#dashboard .dashboard-sidebar h2,#dashboard .dashboard-sidebar small{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#dashboard .dashboard-sidebar label{margin:0;font-size:12px;font-weight:600;color:var(--color-text-muted)}
#dashboard .dashboard-sidebar select{margin-top:6px;width:100%}
#dashboard .dashboard-sidebar button{width:auto;margin:0;height:var(--control-height);padding:0 16px}

/* ---- Liste paneli başlığı ---- */
#dashboard .dashboard-list{min-height:320px;overflow:hidden}
#dashboard .dashboard-list>.panel-heading{gap:16px;flex-wrap:wrap;padding:16px 20px}
#dashboard .dashboard-list .match-list-tools{flex:1;justify-content:flex-end}
#dashboard .dashboard-list input{width:100%;max-width:360px}
#dashboard #dashboardViewToggle{height:var(--control-height);padding:0 14px;font-size:13px;font-weight:600}

/* ---- Kart görünümü: iki sütunlu maç kartları ---- */
#dashboard #matchCards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,420px),1fr));gap:16px;padding:20px;background:var(--color-surface-raised)}
#dashboard #matchCards>.match-table-scroll,#dashboard #matchCards>.dashboard-empty{grid-column:1/-1}
#dashboard .match-card{display:flex;flex-direction:column;gap:14px;padding:18px 20px;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface);transition:border-color var(--motion-fast),box-shadow var(--motion-fast)}
#dashboard .match-card:hover{background:var(--color-surface);border-color:var(--color-primary);box-shadow:var(--shadow-sm)}
#dashboard .match-date{align-items:baseline;font-size:12px;color:var(--color-text-muted)}
#dashboard .match-date b{font-size:13px;color:var(--color-text)}
#dashboard .match-teams{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;margin:0}
#dashboard .match-teams strong{font-size:16px;font-weight:500;line-height:1.25;color:#5b7384;overflow-wrap:anywhere}
#dashboard .match-teams strong.is-winner{font-weight:700;color:var(--color-text)}
#dashboard .match-score{gap:8px;min-width:76px;padding:8px 12px;border-radius:var(--radius-md);background:#111c2e;font-size:22px;line-height:1;font-variant-numeric:tabular-nums}
#dashboard .match-score b{font-weight:600;color:#93a8ba}
#dashboard .match-score b.win{font-weight:800;color:var(--color-primary)}
#dashboard .match-score i{color:#556b7d}
#dashboard .card-details{align-items:center;gap:8px 14px;font-size:12px;color:var(--color-text-muted)}
.set-chips{display:flex;flex-wrap:wrap;gap:6px}
.set-chip{font-style:normal;padding:3px 8px;border:1px solid var(--color-divider);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text);font-size:12px;font-variant-numeric:tabular-nums}
.action-count{font-variant-numeric:tabular-nums}
.video-flag{margin-left:auto;padding:3px 10px;border-radius:999px;background:#e9eff3;color:var(--color-text-muted);font-weight:600}
.video-flag::before{content:"○ "}
.video-flag.on{background:var(--color-success-soft);color:var(--color-success)}
.video-flag.on::before{content:"● "}
#dashboard .card-actions{margin-top:auto;padding-top:14px;border-top:1px solid var(--color-divider);gap:8px}
#dashboard .card-actions small{font-size:12px;color:var(--color-text-muted)}
#dashboard .card-actions a{padding:8px 14px;border-radius:var(--radius-md);font-size:13px}
#dashboard .card-actions a:hover{background:var(--color-primary-soft);border-color:var(--color-primary)}
#dashboard .card-actions .open-match{background:var(--color-primary)!important;border-color:var(--color-primary);color:#062c39!important}
#dashboard .card-actions .open-match:hover{background:var(--color-primary-hover)!important}
#dashboard .delete-scout{order:-1;padding:6px 8px;border-color:transparent;background:transparent;color:#8a6a70;font-size:12px}
#dashboard .delete-scout:hover:not(:disabled){border-color:var(--color-danger);background:var(--color-danger-soft);color:var(--color-danger)}
#dashboard .card-actions .delete-scout{order:0}

/* ---- Liste görünümü ---- */
#dashboard #matchCards:has(>.match-table-scroll){display:block;padding:0;background:transparent}
#dashboard .match-directory .match-directory-team{font-weight:500;color:#5b7384}
#dashboard .match-directory .match-directory-team.is-winner{font-weight:700;color:var(--color-text)}
#dashboard .match-directory tbody tr:hover td{background:#f6fafc}

@media (max-width:900px){
 #dashboard .dashboard-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}
 #dashboard .dashboard-sidebar button{grid-column:1/-1;width:100%}
 #dashboard .dashboard-list .match-list-tools{justify-content:stretch;flex-basis:100%}
 #dashboard .dashboard-list input{max-width:none;flex:1}
 .dashboard-stats>div{padding:0 16px}
}
@media (max-width:560px){
 #dashboard .dashboard-sidebar{grid-template-columns:1fr}
 #dashboard #matchCards{padding:12px;gap:12px}
 #dashboard .match-card{padding:16px}
 #dashboard .match-teams strong{font-size:14px}
 #dashboard .card-actions{flex-wrap:wrap}
 #dashboard .card-actions small{flex-basis:100%;margin-right:0}
 #dashboard .card-actions a,#dashboard .delete-scout{white-space:nowrap}
 #dashboard .card-actions .open-match{margin-left:auto}
 .workspace-nav a{padding:12px 12px}
 #dashboard .dashboard-title h1{font-size:26px}
 .dashboard-stats{width:100%}
 .dashboard-stats>div:first-child{padding-left:0}
}
@media (prefers-reduced-motion:reduce){.workspace-nav a,#dashboard .match-card{transition:none}}

/* ======================================================================
   Maç çalışma alanı: maç başlığı, sekmeler ve Genel Bakış
   ====================================================================== */

/* ---- Maç başlığı: skor tahtası ---- */
#appMain .matchbar{align-items:flex-end;gap:16px 24px;flex-wrap:wrap;margin-bottom:20px;padding:20px 24px;border:1px solid #22324a;border-radius:var(--radius-lg);background:#0f1a2e}
#appMain .matchbar .eyebrow{margin-bottom:6px;font-size:12px;font-weight:600;letter-spacing:.02em;color:#8fa6c3}
#appMain .matchbar h1{font-size:clamp(22px,2.4vw,32px);font-weight:700;line-height:1.15;letter-spacing:-.01em}
#appMain .match-identity{gap:20px;flex-wrap:wrap}
#appMain .workspace-score{display:inline-flex;align-items:center;gap:10px;padding:8px 16px;border-radius:var(--radius-md);background:#080d1b;border:1px solid #22324a;font-size:32px;font-weight:600}
#appMain .workspace-score b{font-weight:600;color:#93a8ba}
#appMain .workspace-score b.win{font-weight:800;color:var(--color-primary)}
#appMain .workspace-score i{font-style:normal;color:#556b7d}
#appMain .set-scores{margin-top:12px}
#appMain .set-score{padding:4px 10px;border:1px solid #2b3d58;border-radius:var(--radius-sm);background:#162238;color:#9fb3c8;font-size:12px}
#appMain .set-score b{margin-left:8px;color:#e8f1f8}
#appMain .matchbar .archive{margin-left:auto}

/* ---- Maç sekmeleri (Scout · Genel Bakış · Video Analizi · ...) ---- */
.view-nav>div{gap:2px;padding:4px;border:1px solid #22324a;border-radius:10px;background:#0f1a2e}
.view-nav>div button{padding:9px 14px;border:0;border-radius:var(--radius-md);background:transparent;color:#9caec5;font-size:13px;font-weight:600;white-space:nowrap}
.view-nav>div button:hover:not(:disabled):not([aria-current]){background:#1a2640;color:#fff;border-color:transparent}
.view-nav>div button[aria-current]{background:#123a4a;color:#7fe6f7;box-shadow:inset 0 -2px var(--color-primary)}
#matchView .view-nav>div{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:thin}
#matchView>.view-nav{margin-bottom:20px;padding-bottom:0;border-bottom:0}

/* ---- Genel Bakış ---- */
#dashboardView .dashboard-card{padding:20px;border-radius:var(--radius-lg)}
#dashboardView .dashboard-card-heading{align-items:center;padding-bottom:14px;margin-bottom:14px}
#dashboardView .dashboard-card-heading .eyebrow{display:none}
#dashboardView .dashboard-card-heading h3{margin:0;font-size:18px}
#dashboardView .dashboard-card-heading button{margin:0;padding:6px 10px;border-color:transparent;background:transparent;color:var(--color-primary-ink);font-size:13px;white-space:nowrap}
#dashboardView .dashboard-card-heading button:hover:not(:disabled){background:var(--color-primary-soft);border-color:transparent}
#dashboardView .dashboard-info{margin:0 0 12px;border:0;background:transparent;box-shadow:none}
#dashboardView .dashboard-info summary{padding:0;color:var(--color-text-muted);font-weight:500}
#dashboardView .dashboard-info summary:hover{color:var(--color-primary-ink)}
#dashboardView .dashboard-info[open] p{margin-top:8px;padding:10px 12px;border-radius:var(--radius-sm);background:var(--color-surface-raised)}
#dashboardView .dashboard-metrics-info{margin:0}
#dashboardView .dashboard-metrics-info summary{color:#9caec5}
#dashboardView .dashboard-metrics-info summary:hover{color:#fff}
#dashboardView .dashboard-metrics-info[open] p{background:#0f1a2e;color:#b6c6d6}
#dashboardView .dashboard-metric{padding:18px 20px;border-radius:var(--radius-lg)}
#dashboardView .dashboard-metric span{font-size:13px;font-weight:600}
#dashboardView .dashboard-metric strong{font-size:34px;margin:6px 0}
#dashboardView .dashboard-rotation-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#dashboardView .dashboard-rotation{padding:12px 14px;border-left:4px solid var(--color-border);border-radius:var(--radius-md)}
#dashboardView .dashboard-rotation.positive{border-left-color:var(--color-success)}
#dashboardView .dashboard-rotation.negative{border-left-color:var(--color-danger)}
#dashboardView .dashboard-rotation b{font-size:13px;color:var(--color-text-muted)}
#dashboardView .dashboard-rotation strong{font-size:26px}
#dashboardView .dashboard-rotation small{font-size:12px;line-height:1.35}
#dashboardView .dashboard-note{display:block;margin-top:14px;font-size:12px}
#dashboardView .dashboard-direction{padding:14px 0}
#dashboardView .dashboard-direction strong{font-size:17px}
#dashboardView .dashboard-type-summary{padding-top:16px}
#dashboardView .dashboard-recent th{padding:10px 8px;font-weight:600}
#dashboardView .dashboard-recent td{padding:11px 8px}
#dashboardView .dashboard-recent tbody tr:hover td{background:var(--color-surface-raised)}
#dashboardView .dashboard-player{padding:14px 0}

@media (max-width:700px){
 #appMain .matchbar{padding:16px}
 #appMain .matchbar .archive{margin-left:0;max-width:none;flex-basis:100%}
 #appMain .workspace-score{font-size:26px}
 #dashboardView .dashboard-rotation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #dashboardView .dashboard-card-heading{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){#dashboardView .dashboard-rotation{transition:none}}

/* Rotasyon sayı farkı: saha yerleşimi (üst sıra R1–R6–R5, alt sıra R2–R3–R4) */
#dashboardView .dashboard-rotation-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:"r1 r6 r5" "r2 r3 r4"}
#dashboardView .dashboard-rotation[data-dashboard-rotation="1"]{grid-area:r1}
#dashboardView .dashboard-rotation[data-dashboard-rotation="2"]{grid-area:r2}
#dashboardView .dashboard-rotation[data-dashboard-rotation="3"]{grid-area:r3}
#dashboardView .dashboard-rotation[data-dashboard-rotation="4"]{grid-area:r4}
#dashboardView .dashboard-rotation[data-dashboard-rotation="5"]{grid-area:r5}
#dashboardView .dashboard-rotation[data-dashboard-rotation="6"]{grid-area:r6}

/* ---- Çalışma alanı başlığı (Video koleksiyonları · Rakip analizi) ---- */
.collections-page header,.opponent-page header{height:auto}
.workspace-head{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;margin:0 0 20px;padding:0 0 18px;border-bottom:1px solid #22324a;flex-wrap:wrap}
.workspace-head h1{margin:3px 0 6px;font-size:30px;line-height:1.15;letter-spacing:-.015em;color:#f4f9fc}
.workspace-eyebrow{margin:0;font-size:10px;font-weight:750;letter-spacing:.12em;text-transform:uppercase;color:#8edcec}
.workspace-lead{max-width:720px;margin:0;font-size:13px;line-height:1.55;color:#9cb2c9}
.workspace-head-meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:0;max-width:420px}
.workspace-account{padding:4px 11px;border:1px solid #2b3d58;border-radius:999px;background:#111a2e;color:#b1c3d7;font-size:11px;font-weight:600;white-space:nowrap}
.workspace-account:empty{display:none}
.workspace-status{margin:0;font-size:11.5px;line-height:1.45;color:#8fa6c3;text-align:right}
.workspace-status:not(:empty){padding:0;border:0;background:none}
@media(max-width:760px){.workspace-head{align-items:flex-start;gap:12px}.workspace-head h1{font-size:24px}.workspace-head-meta{align-items:flex-start;max-width:100%}.workspace-status{text-align:left}}
