/* ── Base Reset & Layout ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f6fc;
    color: #111;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    letter-spacing: -0.01em;
}
h1, h2, h3 { font-family: "Libre Baskerville", Georgia, serif; color: #050a30; }
a { color: #050a30; text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-decoration-color: #f9a825; text-underline-offset: 3px; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
    background: #050a30;
    color: white;
    padding: 0 1.5rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #f9a825;
}
.navbar-brand { font-family: "Libre Baskerville", Georgia, serif; font-weight: 700; font-size: 0.95rem; color: white; letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.navbar-brand:hover { text-decoration: none; color: white; }
.navbar-logo { height: 36px; width: auto; }
.navbar-nav { display: flex; gap: 1rem; align-items: center; }
.navbar-nav a {
    color: rgba(255,255,255,0.55);
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    letter-spacing: -0.01em;
    transition: background 0.15s, color 0.15s;
}
.navbar-nav a:hover, .navbar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}
.navbar-user {
    color: #94a3b8;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.navbar-user .role-badge {
    background: rgba(255,255,255,0.12);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.logout-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.subnav {
    background: #050a30;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
    position: sticky;
    top: 48px;
    z-index: 999;
}
.subnav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}
.subnav-link {
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.subnav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.subnav-link.active {
    color: #050a30;
    background: #f9a825;
    text-decoration: none;
}

/* ── Bottom Nav (mobile only) ───────────────────────── */
.bottom-nav { display: none; }

@media (max-width: 640px) {
    /* Hide desktop nav links and user info in top bar */
    .navbar-nav { display: none; }
    .navbar-username { display: none; }
    .role-badge { display: none; }
    .navbar .logout-btn { display: none; }
    .subnav {
        top: 56px;
    }
    .subnav-inner {
        padding: 0.55rem 1rem;
    }

    /* Bottom nav visible on mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #050a30;
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0.6rem 0.5rem;
        color: rgba(255,255,255,0.45);
        font-size: 0.68rem;
        font-weight: 500;
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        transition: color 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item.active,
    .bottom-nav-item:hover { color: white; text-decoration: none; }
    .bottom-nav-item.active svg { stroke: #fff; }
    .bottom-nav-logout { color: rgba(255,255,255,0.35); }
    .bottom-nav-logout:hover { color: #fff; }

    /* Push content above bottom nav */
    .container { padding-bottom: 5rem; }
}

/* ── Main Content ───────────────────────────────────── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}
.container.container-wide {
    max-width: 1400px;
}

/* ── Tabs ───────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}
.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-weight: 600;
    color: #64748b;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.tab:hover { color: #111; }
.tab.active {
    color: #050a30;
    border-bottom-color: #f9a825;
}

/* ── Tab Content ────────────────────────────────────── */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Cards ──────────────────────────────────────────── */
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
    border-color: #ccc;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,.1);
    transform: translateY(-1px);
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
    min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #050a30; color: white; border-radius: 8px; font-weight: 600; }
.btn-primary:hover { background: #0a1a4a; color: white; text-decoration: none; }
.btn-primary:not(.btn-sm) { background: #f9a825; color: #050a30; border-radius: 25px; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; }
.btn-primary:not(.btn-sm):hover { background: #e09000; color: #050a30; }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover { background: #16a34a; color: white; text-decoration: none; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; color: white; text-decoration: none; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-secondary:hover { background: #cbd5e1; color: #334155; text-decoration: none; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 1rem 1.5rem; font-size: 1.1rem; min-height: 56px; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; min-height: 32px; }

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #475569;
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: #050a30;
    box-shadow: 0 0 0 3px rgba(249, 168, 37, 0.2);
}
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ── Alerts / Toasts ─────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-warning { background: #fff7ed; color: #9a3412; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ── Ring Module ─────────────────────────────────────── */
.ring-stats-bar {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
}
.ring-stats-bar .stat {
    text-align: center;
    flex: 1;
}
.ring-stats-bar .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #050a30;
}
.ring-stats-bar .stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}

.ring-card {
    border-radius: 12px;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
    border: 1px solid #e5e5e5;
    padding: 1.5rem;
    background: white;
    margin-bottom: 1rem;
}
.ring-card h2 { margin: 0.5rem 0; font-size: 1.3rem; }
.ring-card .subtitle { color: #64748b; margin-bottom: 1rem; }

.ring-call-btn {
    display: block;
    width: 100%;
    padding: 16px;
    min-height: 60px;
    background: #22c55e;
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: 12px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, transform 0.1s;
}
.ring-call-btn:hover { background: #16a34a; color: white; text-decoration: none; }
.ring-call-btn:active { background: #15803d; transform: scale(0.98); }

/* ── Priority Badges ─────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 0.72rem; }
.badge-varm { background: #fee2e2; color: #dc2626; }
.badge-lunken { background: #fff7ed; color: #ea580c; }
.badge-kald { background: #eff6ff; color: #2563eb; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fff7ed; color: #9a3412; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ── Outcome Pills ──────────────────────────────────── */
.outcome-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
}
.outcome-pill {
    padding: 0.5rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.82rem;
    color: #333;
    transition: all 0.15s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.outcome-pill:hover { background: #050a30; color: #fff; border-color: #050a30; }
.outcome-pill.selected { background: #050a30; color: white; border-color: #050a30; }
.outcome-pill:first-child { border-color: #f9a825; color: #050a30; font-weight: 600; background: rgba(249,168,37,0.12); }
.outcome-pill:first-child:hover { background: #f9a825; color: #050a30; border-color: #f9a825; }

/* ── Recent Calls ────────────────────────────────────── */
.recent-call {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.recent-call:last-child { border-bottom: none; }
.recent-call .call-info { flex: 1; }
.recent-call .call-company { font-weight: 600; }
.recent-call .call-meta { font-size: 0.8rem; color: #64748b; }

/* ── Ring Lists ──────────────────────────────────────── */
.ring-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.ring-list-item:last-child { border-bottom: none; }
.ring-list-name { font-weight: 600; flex: 1; }
.ring-list-meta { font-size: 0.8rem; color: #64748b; }
.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    flex: 2;
}
.progress-bar-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 4px;
    transition: width 0.3s;
}

/* ── Seller Stats Table ──────────────────────────────── */
.seller-stats { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.seller-stats th, .seller-stats td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.85rem;
}
.seller-stats th {
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}
.seller-stats td { border-bottom: 1px solid #f8fafc; }

/* ── Tasks Module ────────────────────────────────────── */
.kanban {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.kanban-column {
    background: #eef1f8;
    border-radius: 12px;
    padding: 0.85rem;
    min-height: 200px;
}
.kanban-header {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.kanban-count {
    background: rgba(5,10,48,0.1);
    color: #050a30;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ── Task Cards ──────────────────────────────────────── */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e5e5;
    box-shadow: none;
    cursor: grab;
    transition: border-color 0.15s, transform 0.1s;
    border-left: 3px solid transparent;
}
.task-card:hover { border-color: #ccc; }
.task-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.task-card-high { border-left-color: #ef4444; }
.task-card-medium { border-left-color: #f97316; }
.task-card-low { border-left-color: #22c55e; }
.task-card .task-title { font-weight: 600; font-size: 0.84rem; letter-spacing: -0.01em; margin-bottom: 0.3rem; }
.task-card .task-meta { font-size: 0.72rem; color: #888; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Due date badges ───────────────────────────────── */
.due-overdue { color: #dc2626; font-weight: 600; }
.due-today { color: #ea580c; font-weight: 600; }
.due-week { color: #d97706; }
.due-future { color: #64748b; }

/* ── Metrics Row ────────────────────────────────────── */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 769px) {
    .metrics { gap: 1rem; }
}
@media (max-width: 768px) {
    .metrics { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 0.5rem; }
    .metric { padding: 0.75rem 0.5rem; }
    .metric-value { font-size: 1.4rem; }
    .metric-label { font-size: 0.7rem; }
}
.metric {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.metric:hover {
    border-color: #ccc;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.metric-value { font-size: 1.8rem; font-weight: 800; color: #050a30; letter-spacing: -0.03em; }
.metric-label { font-size: 0.68rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Login Page ─────────────────────────────────────── */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
}
.login-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
    padding: 2rem;
    border-top: 3px solid #f9a825;
}
.login-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #050a30;
}
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}
.login-divider::before, .login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.btn-entra {
    background: #050a30;
    color: white;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 0.5rem;
    border-radius: 8px;
}
.btn-entra:hover { background: #0a1a4a; color: white; text-decoration: none; }
.entra-icon { vertical-align: middle; }

/* ── Collapsible / Expander ─────────────────────────── */
.expander {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.expander-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    background: #f4f6fc;
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: -0.01em;
}
.expander-header:hover { background: #eef1f8; }
.expander-body { padding: 0 1rem 1rem; display: none; }
.expander.open .expander-body { display: block; }
.expander-chevron { transition: transform 0.2s; }
.expander.open .expander-chevron { transform: rotate(180deg); }

/* ── Confirm Dialog / Modal ────────────────────────── */
.confirm-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
}
.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.confirm-actions { display: flex; gap: 0.75rem; margin-top: 1rem; justify-content: flex-end; }

/* ── HTMX Loading Indicator ──────────────────────────── */
.htmx-indicator {
    display: none;
    opacity: 0;
    transition: opacity 200ms;
}
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator {
    display: inline-block;
    opacity: 1;
}
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #eef1f8;
    border-top-color: #f9a825;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Mobile Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 0.75rem; }
    .kanban { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .ring-call-btn { padding: 18px; font-size: 1.1rem; }
    .ring-card { padding: 0.85rem; }
    .ring-stats-bar { flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
    .ring-stats-bar .stat-value { font-size: 1.1rem; }
    .ring-stats-bar .stat-label { font-size: 0.6rem; }
    .navbar { padding: 0 0.75rem; height: 44px; }
    .navbar-brand { font-size: 0.85rem; }
    .navbar-nav { gap: 0.35rem; }
    .navbar-nav a { padding: 0.25rem 0.4rem; font-size: 0.75rem; }
    .outcome-pills { gap: 0.35rem; }
    .outcome-pill { padding: 0.45rem 0.65rem; font-size: 0.78rem; }
    .tabs { overflow-x: auto; }
    .card { padding: 1rem; }
    .page-header h1 { font-size: 1.2rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.4rem 0.5rem; }
}

/* ── Utility ─────────────────────────────────────────── */
.text-success { color: #16a34a; }
.text-warning { color: #d97706; }
.text-danger  { color: #dc2626; }
.text-muted   { color: #94a3b8; }

/* ── Page Header ────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-header h1 { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; color: #050a30; }

/* ── Data Table ─────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th,
.data-table td { padding: 0.55rem 0.75rem; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 0.85rem; }
.data-table th { font-weight: 600; color: #64748b; background: transparent; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid #eef1f8; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tfoot th,
.data-table tfoot td { border-top: 2px solid #e2e8f0; font-weight: 700; background: none; color: #1e293b; border-bottom: none; }
.data-table .total-row th,
.data-table .total-row td { border-top: 2px solid #e2e8f0; font-weight: 700; }

/* ── Loading Spinner ─────────────────────────────────── */
.loading-spinner { display: flex; align-items: center; gap: 0.5rem; padding: 3rem; justify-content: center; color: #94a3b8; }

/* ── Period Selector ─────────────────────────────────── */
.period-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.view-tabs { display: flex; background: #eef1f8; border-radius: 10px; padding: 3px; gap: 2px; }
.view-tab {
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
    transition: all 0.15s;
}
.view-tab.active { background: #050a30; color: #fff; box-shadow: none; }

/* ── ARR Goal Card ───────────────────────────────────── */
.arr-goal-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
}
.arr-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.arr-goal-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}
.arr-goal-pct { font-size: 0.9rem; font-weight: 700; color: #60a5fa; }
.arr-goal-numbers {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.arr-current { font-size: 2.4rem; font-weight: 800; color: white; line-height: 1; }
.arr-target { font-size: 1rem; color: #475569; }
.arr-progress-container {
    position: relative;
    height: 24px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 0.75rem;
}
.arr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 12px;
    transition: width 0.6s ease;
    min-width: 4px;
}
.arr-pace-marker {
    position: absolute;
    top: -5px;
    bottom: -5px;
    width: 3px;
    background: #fbbf24;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 0 6px rgba(251,191,36,0.6);
}
.arr-pace-text { font-size: 0.85rem; color: #64748b; }
.arr-pace-text.pace-ahead { color: #4ade80; }
.arr-pace-text.pace-behind { color: #f87171; }

/* ── Two-column Grid ─────────────────────────────────── */
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 768px) { .two-col-grid { grid-template-columns: 1fr; } }

/* ── KPI Progress Bars ───────────────────────────────── */
.kpi-progress { margin-bottom: 0.75rem; }
.kpi-progress-sm { margin-bottom: 0.5rem; }
.kpi-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.3rem;
}
.kpi-values { font-weight: 400; color: #94a3b8; font-size: 0.8rem; }
.progress-bar-container { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.bar-green  { background: #22c55e; }
.bar-yellow { background: #eab308; }
.bar-red    { background: #ef4444; }

/* ── Leaderboard ─────────────────────────────────────── */
.leaderboard-list { list-style: none; padding: 0; margin: 0; }
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.2rem;
}
.leaderboard-item.gold   { background: rgba(251,191,36,0.12); }
.leaderboard-item.silver { background: rgba(148,163,184,0.1); }
.leaderboard-item.bronze { background: rgba(180,83,9,0.08); }
.lb-medal { font-size: 1.2rem; width: 2rem; text-align: center; }
.lb-name  { flex: 1; font-weight: 600; font-size: 0.95rem; }
.lb-pct   { font-weight: 700; font-size: 1rem; }

/* ── Reporters ───────────────────────────────────────── */
.reporters-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.reporter-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}
.reporter-badge.reported     { background: #dcfce7; color: #166534; }
.reporter-badge.not-reported { background: #fee2e2; color: #991b1b; }

/* ── Seller Details Expander ─────────────────────────── */
.seller-details {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.seller-details summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1rem;
    cursor: pointer;
    background: #f4f6fc;
    font-size: 0.84rem;
    list-style: none;
    user-select: none;
}
.seller-details summary::-webkit-details-marker { display: none; }
.seller-details summary::after { content: '▾'; color: #999; margin-left: 0.5rem; }
.seller-details[open] summary::after { content: '▴'; }
.seller-details[open] summary { background: #eef1f8; }
.seller-progress-body { padding: 0.75rem 1rem 0.25rem; }

/* ── KPI Hero Row ─────────────────────────────────────── */
.kpi-hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.kpi-hero-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;
    padding: 1.5rem;
}
.kpi-hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.kpi-hero-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}
.kpi-hero-unit {
    font-size: 1rem;
    font-weight: 600;
    color: #94a3b8;
}
.kpi-hero-sub {
    font-size: 0.8rem;
    color: #475569;
    margin-top: 0.25rem;
}

/* ── KPI Stats Row ────────────────────────────────────── */
.kpi-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.kpi-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.1rem 1rem 1rem 1.1rem;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #e5e5e5;
    box-shadow: 0 4px 10px -2px rgba(0,0,0,.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.kpi-stat-card:hover {
    border-color: #ccc;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.kpi-stat-card.accent-green  { border-left-color: #22c55e; }
.kpi-stat-card.accent-red    { border-left-color: #ef4444; }
.kpi-stat-card.accent-blue   { border-left-color: #2563eb; }
.kpi-stat-card.accent-orange { border-left-color: #f97316; }
.kpi-stat-label {
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.kpi-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #050a30;
    line-height: 1.1;
}
.kpi-stat-unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
}
.kpi-stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.3rem;
}

@media (max-width: 640px) {
    .kpi-hero-row { grid-template-columns: 1fr; }
}

/* ── Prospekt ───────────────────────────────────────── */
.prospekt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 768px) { .prospekt-stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .prospekt-stats-grid { grid-template-columns: 1fr; } }
.prospekt-filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.9rem;
    align-items: end;
}
.prospekt-search-group { grid-column: span 2; min-width: 200px; }
.prospekt-checkbox {
    display: flex;
    align-items: center;
    min-height: 44px;
}
.prospekt-coverage-card { margin-bottom: 1rem; }
.prospekt-badge-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.prospekt-segment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid #f1f5f9;
}
.prospekt-segment-row:first-of-type { border-top: none; padding-top: 0; }
.prospekt-segment-metrics {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}
.prospekt-table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.prospekt-table tbody tr.prospekt-row td {
    vertical-align: top;
}
.prospekt-row.researched td:first-child {
    border-left: 4px solid #22c55e;
}
.prospekt-detail-shell {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
}
.prospekt-detail-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}
.prospekt-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
}
.prospekt-detail-section + .prospekt-detail-section {
    margin-top: 1rem;
}
.prospekt-detail-section h4 {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}
.prospekt-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.prospekt-meta-grid span {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}
.prospekt-meta-grid strong {
    display: block;
    font-size: 0.95rem;
}
.prospekt-contact-list,
.prospekt-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.prospekt-contact-card,
.prospekt-log-row {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.prospekt-contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.8rem;
}
.prospekt-contact-meta span {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}
.prospekt-research-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9rem;
    line-height: 1.55;
}
.prospekt-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .container.container-wide { padding: 0.75rem; }
    .prospekt-filter-bar {
        grid-template-columns: 1fr 1fr;
    }
    .prospekt-search-group {
        grid-column: span 2;
    }
    .prospekt-detail-grid,
    .prospekt-meta-grid {
        grid-template-columns: 1fr;
    }
    .prospekt-table th:nth-child(4),
    .prospekt-table td:nth-child(4),
    .prospekt-table th:nth-child(5),
    .prospekt-table td:nth-child(5) {
        display: none;
    }
}
@media (max-width: 480px) {
    .prospekt-filter-bar {
        grid-template-columns: 1fr;
    }
    .prospekt-search-group {
        grid-column: span 1;
    }
    .prospekt-table th:nth-child(3),
    .prospekt-table td:nth-child(3),
    .prospekt-table th:nth-child(6),
    .prospekt-table td:nth-child(6) {
        display: none;
    }
}

/* ── KPI Tabs ────────────────────────────────────────── */
.kpi-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
}
.kpi-tab {
    padding: 0.6rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    background: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.kpi-tab:hover  { color: #111; }
.kpi-tab.active { color: #050a30; border-bottom-color: #f9a825; }

/* ── Cost Form ───────────────────────────────────────── */
.cost-form { margin-top: 1.25rem; }
.cost-form .form-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ── Kunder: icon buttons for risk smileys ──────────── */
.btn-icon {
    background: none;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 2px 4px;
    opacity: 0.4;
    transition: opacity 0.15s, border-color 0.15s;
}
.btn-icon:hover { opacity: 1; }
.btn-icon.btn-icon-active {
    opacity: 1;
    border-color: #111;
}
