/* ============================================================================
 * AutoPublish.nl — "FUTURISTIC CLEAN SAAS" Design System (Bootstrap 5.3.3)
 * Stijl: Neo-SaaS / Zakelijk Futuristisch (Linear / Stripe / Vercel mix)
 * Achtergrond: #F8FAFC | Sidebar: #0F172A | Accent: #4F46E5 -> #06B6D4
 * ============================================================================ */

:root {
    --ap-bg-canvas: #F8FAFC;
    --ap-sidebar-bg: #0F172A;
    --ap-sidebar-border: rgba(255, 255, 255, 0.08);
    --ap-primary: #4F46E5;
    --ap-primary-hover: #4338CA;
    --ap-cyan: #06B6D4;
    --ap-gradient: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
    --ap-gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    --ap-card-bg: #FFFFFF;
    --ap-card-border: #E2E8F0;
    --ap-card-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05);
    --ap-card-shadow-hover: 0 20px 40px -10px rgba(15, 23, 42, 0.10);
    --ap-text-main: #0F172A;
    --ap-text-muted: #64748B;
    --ap-success: #10B981;
    --ap-warning: #F59E0B;
    --ap-danger: #EF4444;
    --ap-radius: 16px;
    --ap-sidebar-width: 272px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--ap-bg-canvas);
    color: var(--ap-text-main);
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* Ambient Mesh Header Background */
.ap-ambient-mesh {
    background-color: var(--ap-bg-canvas);
    background-image:
        radial-gradient(at 15% 10%, rgba(79, 70, 229, 0.09) 0px, transparent 45%),
        radial-gradient(at 85% 5%, rgba(6, 182, 212, 0.09) 0px, transparent 45%);
}

/* Typography & Gradient Text */
.ap-text-gradient {
    background: var(--ap-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Primary Gradient Buttons */
.btn-ap-primary {
    background: var(--ap-gradient);
    color: #FFFFFF !important;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.38);
    transition: all 0.22s ease;
}

.btn-ap-primary:hover, .btn-ap-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -4px rgba(79, 70, 229, 0.52);
    filter: brightness(1.04);
}

.btn-ap-outline {
    background: #FFFFFF;
    color: var(--ap-text-main);
    border: 1px solid #CBD5E1;
    border-radius: 12px;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-ap-outline:hover {
    border-color: var(--ap-primary);
    color: var(--ap-primary);
    background: rgba(79, 70, 229, 0.03);
}

/* Cards */
.ap-card {
    background: var(--ap-card-bg);
    border: 1px solid var(--ap-card-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-card-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ap-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--ap-card-shadow-hover);
    border-color: rgba(79, 70, 229, 0.28);
}

/* App Layout: Cosmic Slate Sidebar + Main Content */
.ap-app-wrapper {
    display: flex;
    min-height: 100vh;
}

.ap-sidebar {
    width: var(--ap-sidebar-width);
    background: var(--ap-sidebar-bg);
    color: #F8FAFC;
    border-right: 1px solid var(--ap-sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1030;
    transition: transform 0.25s ease;
}

.ap-main-content {
    flex: 1;
    margin-left: var(--ap-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .ap-sidebar {
        transform: translateX(-100%);
    }
    .ap-sidebar.show {
        transform: translateX(0);
    }
    .ap-main-content {
        margin-left: 0;
    }
}

.ap-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: #FFFFFF;
    text-decoration: none;
}

.ap-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--ap-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.35);
}

/* Sidebar Navigation Links */
.ap-nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748B;
    padding: 0.75rem 1rem 0.35rem;
}

.ap-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.75rem;
    border-radius: 11px;
    color: #94A3B8;
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.18s ease;
}

.ap-nav-link i {
    font-size: 1.1rem;
    color: #64748B;
    transition: color 0.18s ease;
}

.ap-nav-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
}

.ap-nav-link:hover i {
    color: var(--ap-cyan);
}

.ap-nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(6, 182, 212, 0.16) 100%);
    border-color: rgba(99, 102, 241, 0.35);
    font-weight: 600;
}

.ap-nav-link.active i {
    color: var(--ap-cyan);
}

/* Pulsing Status Badges (Groen = Actief, Oranje = Verloopt binnenkort, Rood = Verlopen/Fout) */
.ap-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.ap-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.ap-status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    animation: apPulse 2s infinite ease-out;
}

@keyframes apPulse {
    0% { transform: scale(0.8); opacity: 0.75; }
    70% { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}

.ap-status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.ap-status-active .ap-status-dot,
.ap-status-active .ap-status-dot::after {
    background-color: #10B981;
}

.ap-status-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #B45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.ap-status-warning .ap-status-dot,
.ap-status-warning .ap-status-dot::after {
    background-color: #F59E0B;
}

.ap-status-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #B91C1C;
    border: 1px solid rgba(239, 68, 68, 0.28);
}
.ap-status-danger .ap-status-dot,
.ap-status-danger .ap-status-dot::after {
    background-color: #EF4444;
}

.ap-status-neutral {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}
.ap-status-neutral .ap-status-dot {
    background-color: #94A3B8;
}
.ap-status-neutral .ap-status-dot::after {
    display: none;
}

/* Globale Token-Status Waarschuwingsbalk bovenaan het Dashboard */
.ap-token-alert-bar {
    background: linear-gradient(90deg, rgba(254, 242, 242, 0.96) 0%, rgba(255, 251, 235, 0.96) 100%);
    border-bottom: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.75rem 1.5rem;
}

/* Super Admin Impersonation Topbar */
.ap-impersonation-bar {
    background: linear-gradient(90deg, #4F46E5 0%, #06B6D4 100%);
    color: #FFFFFF;
    padding: 0.55rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Topbar / Header in Dashboard */
.ap-topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ap-card-border);
    padding: 0.9rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* Icon Boxes voor KPI Cards */
.ap-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.ap-kpi-indigo {
    background: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
}
.ap-kpi-cyan {
    background: rgba(6, 182, 212, 0.12);
    color: #0891B2;
}
.ap-kpi-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.ap-kpi-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
}

/* Landingpage Specifieke Stijlen */
.ap-navbar-glass {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ap-pricing-popular {
    border: 2px solid var(--ap-primary) !important;
    box-shadow: 0 24px 48px -12px rgba(79, 70, 229, 0.16) !important;
    position: relative;
}

.ap-progress {
    height: 8px;
    border-radius: 999px;
    background-color: #E2E8F0;
    overflow: hidden;
}

.ap-progress-bar {
    background: var(--ap-gradient);
    border-radius: 999px;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 11px;
    border-color: #CBD5E1;
    padding: 0.625rem 0.95rem;
    font-size: 0.94rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ap-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
/* === POPI-STIJL OVERRIDE (GEEN STANDAARD AI KLEUREN MEER) === */
body.ap-ambient-mesh {
    background: #FAF9F6 !important; /* Rustig warm-wit ipv blauw/groene AI waas */
    background-image: none !important;
}

/* Donkere strakke bovenbalk zoals Popi */
.ap-navbar-glass {
    background: #0F292A !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

/* Nieuw merk-icoon blokje (geen blauw bliksempje meer) */
.ap-brand-icon {
    background: linear-gradient(135deg, #EA580C, #E11D48) !important;
    color: #FFFFFF !important;
    border-radius: 10px !important;
}

/* Opvallende woorden in titels: 1 krachtige kleur ipv AI blauw-cyaan gradient */
.ap-text-gradient {
    background: none !important;
    -webkit-text-fill-color: #E11D48 !important;
    color: #E11D48 !important;
}

/* Knoppen in Popi-stijl (vlakke krachtige kleur + omlijnde kaartknoppen) */
.btn-ap-primary {
    background: #E11D48 !important;
    border: 2px solid #E11D48 !important;
    color: #FFFFFF !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}
.btn-ap-primary:hover {
    background: #BE123C !important;
    border-color: #BE123C !important;
}

.btn-ap-outline {
    background: transparent !important;
    border: 2px solid #0F292A !important;
    color: #0F292A !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
}
.btn-ap-outline:hover {
    background: #0F292A !important;
    color: #FFFFFF !important;
}

/* Popi Kaart-design: Grote cirkel links + vervagende balk rechts */
.ap-card {
    background: #FFFFFF !important;
    border: 1px solid #F1F5F9 !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06) !important;
}

.popi-card-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.popi-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.4rem;
    font-weight: 800;
}
.popi-fade-bar {
    height: 60px;
    flex-grow: 1;
    border-radius: 16px;
}
.popi-orange .popi-circle { background: #F97316; }
.popi-orange .popi-fade-bar { background: linear-gradient(90deg, rgba(249,115,22,0.22) 0%, rgba(249,115,22,0.02) 100%); }

.popi-crimson .popi-circle { background: #E11D48; }
.popi-crimson .popi-fade-bar { background: linear-gradient(90deg, rgba(225,29,72,0.22) 0%, rgba(225,29,72,0.02) 100%); }

.popi-teal .popi-circle { background: #0D9488; }
.popi-teal .popi-fade-bar { background: linear-gradient(90deg, rgba(13,148,136,0.22) 0%, rgba(13,148,136,0.02) 100%); }

.popi-navy .popi-circle { background: #1E293B; }
.popi-navy .popi-fade-bar { background: linear-gradient(90deg, rgba(30,41,59,0.18) 0%, rgba(30,41,59,0.02) 100%); }

/* === VERWIJDER ALLE STANDAARD BOOTSTRAP BLAUW (#0d6efd) === */
.btn-primary,
.btn-check:checked + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary:active {
    background-color: #0F292A !important;
    border-color: #0F292A !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

.btn-primary:hover {
    background-color: #1E3A3A !important;
    border-color: #1E3A3A !important;
}

.btn-outline-primary {
    color: #0F292A !important;
    border: 2px solid #CBD5E1 !important;
    background-color: #FFFFFF !important;
    font-weight: 600 !important;
}

.btn-outline-primary:hover {
    background-color: #F8FAFC !important;
    border-color: #0F292A !important;
    color: #0F292A !important;
}

.bg-primary {
    background-color: #0F292A !important;
}

.text-primary,
a.text-primary {
    color: #E11D48 !important;
}

.border-primary {
    border-color: #0F292A !important;
}

/* Stijlvolle Tabs voor de Koppelingen-sectie op de voorpagina */
.ap-integration-tabs .nav-link {
    background: #FFFFFF;
    color: #0F292A;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 700;
    transition: all 0.2s ease;
}
.ap-integration-tabs .nav-link:hover {
    border-color: #0F292A;
}
.ap-integration-tabs .nav-link.active {
    background: #0F292A !important;
    color: #FFFFFF !important;
    border-color: #0F292A !important;
    box-shadow: 0 8px 20px rgba(15, 41, 42, 0.18);
}
/* Zorg dat lichte badges met bg-opacity-10 een zachte achtergrond houden ipv donkerzwart */
.bg-primary.bg-opacity-10 {
    background-color: rgba(225, 29, 72, 0.10) !important;
    color: #E11D48 !important;
}

/* === VERBETERDE FUTURISTISCHE TIMELINE & TABS === */
.ap-timeline {
    position: relative;
    padding-left: 10px;
}
/* De rode lijn loopt nu netjesACHTER de genummerde rondjes langs */
.ap-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 31px;
    width: 2px;
    background: linear-gradient(180deg, #E11D48 0%, rgba(225,29,72,0.15) 100%);
    z-index: 1;
}
.ap-step-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}
.ap-step-item:last-child {
    margin-bottom: 0;
}
.ap-step-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #0F292A;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(15, 41, 42, 0.2);
    border: 2px solid #FFFFFF;
    position: relative;
    z-index: 3; /* Zorgt dat het rondje óver de rode lijn heen valt */
}
.ap-step-content {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px 20px;
    flex-grow: 1;
    transition: all 0.2s ease;
}
.ap-step-content:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}

/* Zorg voor mooie padding in de grote witte stappenkaarten */
#koppelTabsContent .ap-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 40px !important;
}

/* Strakke uitlijning van de tab-knoppen boven de kaart */
.ap-integration-tabs {
    flex-wrap: wrap;
    gap: 10px !important;
}
.ap-integration-tabs .nav-link {
    background: #FFFFFF;
    color: #0F292A;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(15,23,42,0.03);
}
.ap-integration-tabs .nav-link.active {
    background: #0F292A !important;
    color: #FFFFFF !important;
    border-color: #0F292A !important;
    box-shadow: 0 6px 16px rgba(15, 41, 42, 0.15);
}
