@import url("/static/topbar.css");
:root {
    --bg: #F0F2F5; --card: #fff; --border: #e2e8f0; --text: #1e293b;
    --muted: #64748b; --accent: #5CC8E3; --accent-light: #E0F4FA;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.6; font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

.container { max-width: 1280px; margin: 0 auto; padding: 20px 24px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px;
        padding: 20px 24px; margin-bottom: 16px; }
.card h2 { font-size: 18px; margin-bottom: 12px; }
.card h3 { font-size: 15px; color: var(--muted); margin-bottom: 8px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px;
             padding: 16px; text-align: center; }
.stat-card .value { font-size: 28px; font-weight: 700; }
.stat-card .label { font-size: 13px; color: var(--muted); }
.stat-link { display: block; text-decoration: none; color: inherit; }
.stat-link:hover { text-decoration: none; }
.stat-card:has(.stat-link):hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(92,200,227,0.15); cursor: pointer; }
.table-link { color: inherit; font-weight: 600; }
.table-link:hover { text-decoration: underline; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: #f1f5f9; text-align: left; padding: 10px 12px; font-weight: 600;
                 border-bottom: 2px solid var(--border); white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: #f8fafc; }
.data-table .score-cell { font-weight: 700; text-align: center; min-width: 40px; }
.data-table .nowrap { white-space: nowrap; }

/* Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input { padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
                                    font-size: 13px; background: #fff; font-family: 'Inter', sans-serif; }
.filters input[type="text"] { width: 240px; }
.filters input[type="date"] { width: 160px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--accent); color: #fff; border: none;
       border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 500; font-family: 'Inter', sans-serif; }
.btn:hover { background: #4AB5D0; text-decoration: none; color: #fff; }
.btn-secondary { background: #94A3B8; }
.btn-secondary:hover { background: #64748b; }

/* Detail page */
.score-big { font-size: 48px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.skill-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.skill-bar .bar { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.skill-bar .fill { height: 100%; border-radius: 4px; }
.skill-bar .lbl { font-size: 13px; width: 160px; }
.skill-bar .val { font-size: 13px; font-weight: 600; width: 40px; text-align: right; }

.transcript-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px;
                   padding: 16px; font-size: 13px; line-height: 1.8; max-height: 500px; overflow-y: auto; white-space: pre-wrap; }
.transcript-box .sdr { color: #2563eb; font-weight: 600; }
.transcript-box .lead { color: #dc2626; font-weight: 600; }
.transcript-box .ts { color: #94a3b8; font-size: 12px; }

.section-title { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--text); }
.notes-text { font-size: 14px; color: #475569; margin-bottom: 12px; }
.tag { display: inline-block; background: #f1f5f9; border-radius: 6px; padding: 2px 8px;
       font-size: 12px; margin: 2px; color: #475569; }
.tag.good { background: #dcfce7; color: #166534; }
.tag.bad { background: #fee2e2; color: #991b1b; }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

h1 { font-size: 22px; margin: 20px 0 10px; }
h2 { font-size: 18px; margin: 16px 0 8px; }
h3 { font-size: 15px; margin: 12px 0 6px; }
p { margin: 6px 0; font-size: 14px; }
li { margin-left: 24px; font-size: 14px; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Weekly comparison */
.weekly-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 768px) { .weekly-compare-grid { grid-template-columns: 1fr; } }

/* Login */
.login-container { max-width: 400px; margin: 100px auto; }
.login-container input { width: 100%; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--border);
                          border-radius: 8px; font-size: 14px; }
.login-container .btn { width: 100%; }
.error-msg { color: #dc2626; font-size: 14px; margin-bottom: 12px; }

/* Tech banner */
.tech-banner { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px 16px;
               margin-bottom: 12px; color: #991b1b; font-size: 14px; }

/* Summary content */
.summary-content { font-size: 14px; line-height: 1.8; }
.summary-content h1 { font-size: 20px; margin-top: 24px; }
.summary-content h2 { font-size: 17px; margin-top: 20px; }
.summary-content h3 { font-size: 15px; margin-top: 16px; }
.summary-content table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.summary-content th, .summary-content td { padding: 8px 12px; border: 1px solid var(--border); font-size: 13px; }
.summary-content th { background: #f1f5f9; font-weight: 600; }
.summary-content ul, .summary-content ol { margin-left: 24px; margin-bottom: 12px; }

/* ── Wspólne komponenty dashboardów (wzorzec: LTIP) ──
 * Uzywaj ich w kazdym panelu zamiast wlasnych wariantow: naglowek strony,
 * kafle liczb, przelaczniki widoku, pigulki, powiadomienia, tabele. */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; color: #1E293B; letter-spacing: -.2px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; max-width: 90ch; }
.rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 700; line-height: 1.15; margin: 6px 0 4px; font-variant-numeric: tabular-nums; color: #1E293B; }
.stat .value.acc { color: var(--accent); } .stat .value.ok { color: #16A34A; } .stat .value.bad { color: #DC2626; } .stat .value.warn { color: #D97706; }
.stat .hint { font-size: 12px; color: var(--muted); }
.ok { color: #16A34A; } .bad { color: #DC2626; } .warn { color: #D97706; }
.card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; max-width: 100ch; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-group { display: inline-flex; background: var(--bg); border-radius: 8px; padding: 3px; gap: 2px; }
.view-btn { padding: 6px 13px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; border-radius: 6px; cursor: pointer; }
.view-btn.active { background: var(--accent); color: #fff; }
.tablewrap { overflow-x: auto; }
.data-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: #64748B; white-space: nowrap; background: transparent; border-bottom: 2px solid var(--border); }
.data-table td { border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFBFC; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.up { background: #DCFCE7; color: #166534; } .pill.down { background: #FEE2E2; color: #991B1B; } .pill.mute { background: #F1F5F9; color: #475569; } .pill.warn { background: #FEF3C7; color: #92400E; }
.notice { background: #DCFCE7; color: #166534; border-radius: 8px; padding: 9px 14px; margin-bottom: 14px; font-size: 13.5px; }
.notice.bad { background: #FEE2E2; color: #991B1B; } .notice.warn { background: #FEF3C7; color: #92400E; }
.empty { background: #FEF3C7; color: #92400E; border-radius: 8px; padding: 12px 16px; font-size: 13.5px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.legend-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
