/* ==========================================================================
   CHOCOLATE AI WORKFORCE SYSTEM — MASTER DESIGN SYSTEM & CRM SHELL STYLESHEET
   Enterprise Grade • Modern Visual Hierarchy • State-of-the-Art Micro-Interactions
   ========================================================================== */

:root {
    /* Brand & Accent Tokens - Classic Enterprise Corporate Blue */
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #3b82f6;
    --brand-soft: #eff6ff;
    --brand-border: #bfdbfe;
    --brand-glow: rgba(37, 99, 235, 0.2);
    --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);

    /* Universal Classic Blue for Module Accents */
    --ai-marketing: #2563eb;
    --ai-marketing-bg: rgba(37, 99, 235, 0.08);
    --ai-research: #2563eb;
    --ai-research-bg: rgba(37, 99, 235, 0.08);
    --ai-pr: #2563eb;
    --ai-pr-bg: rgba(37, 99, 235, 0.08);
    --ai-sales: #2563eb;
    --ai-sales-bg: rgba(37, 99, 235, 0.08);
    --ai-compliance: #2563eb;
    --ai-compliance-bg: rgba(37, 99, 235, 0.08);
    --ai-search: #2563eb;
    --ai-search-bg: rgba(37, 99, 235, 0.08);

    /* Neutrals & Surfaces - Crisp Classic SaaS */
    --ink: #0f172a;
    --charcoal: #1e293b;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --canvas: #f8fafc;
    --border: #e2e8f0;
    --border-subtle: #e2e8f0;
    --border-active: #bfdbfe;

    /* Sidebar Variables */
    --sidebar-width: 275px;
    --sidebar-bg: #ffffff;
    --sidebar-text: #1e293b;
    --sidebar-border: #e2e8f0;

    /* Elevation & Shadows - Subtle & Refined */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 5px -1px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.18);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--charcoal);
    background: var(--canvas);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

p {
    line-height: 1.6;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--brand-dark);
}

/* Base Form & Button Tokens */
.btn {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.15rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn:active {
    transform: scale(0.98);
}
.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}
.btn-primary:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}
.btn-light {
    background: #ffffff;
    border: 1px solid var(--border);
    color: #1e293b;
    box-shadow: var(--shadow-xs);
}
.btn-light:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
}

.form-control, .form-select, .input-group-text {
    border-color: var(--border);
    border-radius: 8px;
    font-size: 0.925rem;
    padding: 0.55rem 0.85rem;
    transition: all 0.18s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.app-shell {
    min-height: 100vh;
    display: flex;
    background: var(--canvas);
}

/* ==========================================================================
   SIDEBAR COMPONENT
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width) !important;
    flex: 0 0 var(--sidebar-width) !important;
    background: #ffffff !important;
    color: var(--sidebar-text) !important;
    padding: 1.25rem 0.9rem !important;
    display: flex;
    flex-direction: column;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    z-index: 1040;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border-right: 1px solid var(--sidebar-border) !important;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.02) !important;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.sidebar::-webkit-scrollbar { width: 5px !important; }
.sidebar::-webkit-scrollbar-track { background: transparent !important; }
.sidebar::-webkit-scrollbar-thumb { background: #e2e8f0 !important; border-radius: 99px !important; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #cbd5e1 !important; }

/* Sidebar Brand Area */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.35rem 0.5rem 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.75rem;
    position: relative;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-brand:hover .brand-mark {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.brand-title {
    font-weight: 850;
    line-height: 1.15;
    color: var(--ink) !important;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}
.sidebar-brand small {
    color: var(--muted) !important;
    font-weight: 600;
    font-size: 0.73rem;
    letter-spacing: 0.02em;
    display: block;
    margin-top: 1px;
}

/* Sidebar Navigation Items - Classic Enterprise Styling */
.sidebar-nav {
    display: grid;
    gap: 0.2rem;
}
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    color: #334155 !important;
    font-weight: 600;
    font-size: 0.875rem;
    border-left: 3.5px solid transparent;
    transition: all 0.16s ease;
    text-decoration: none;
    position: relative;
}
.sidebar-nav .nav-link i {
    width: 1.35rem;
    font-size: 1.05rem;
    color: #2563eb !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, color 0.16s ease;
}
.sidebar-nav .nav-link:hover {
    color: #0f172a !important;
    background: #f8fafc !important;
    transform: translateX(2px);
}
.sidebar-nav .nav-link:hover i {
    color: #1d4ed8 !important;
    transform: scale(1.08);
}
.sidebar-nav .nav-link.active {
    color: #1e40af !important;
    background: #eff6ff !important;
    border-left: 3.5px solid #2563eb !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06) !important;
}
.sidebar-nav .nav-link.active i {
    color: #1d4ed8 !important;
}

/* Section Labels (Categorization) */
.nav-label {
    margin: 1.15rem 0.75rem 0.35rem;
    color: #64748b !important;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* AI Employees Section Label Highlight */
.nav-label:has(+ .pr-ai-nav-group),
.nav-label:contains('AI Employees') {
    margin-top: 1.25rem;
    color: #1e40af !important;
    position: relative;
}

/* AI Employee Nav Groups & Collapsible Accordions */
.pr-ai-nav-group {
    border-radius: 8px;
    transition: background 0.16s ease;
}
.pr-ai-nav-group.is-active > div > .nav-link,
.pr-ai-nav-group:has(.collapse.show) > div > .nav-link {
    color: #1e40af !important;
    font-weight: 700 !important;
}
.pr-ai-nav-group.is-active > div > .nav-link i,
.pr-ai-nav-group:has(.collapse.show) > div > .nav-link i {
    color: #1d4ed8 !important;
}

/* Accordion Trigger Buttons */
.pr-chevron-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background: transparent;
    transition: all 0.16s ease;
    flex-shrink: 0;
}
.pr-chevron-btn:hover {
    background: #f1f5f9;
    color: #0f172a !important;
}
.pr-chevron-icon {
    display: inline-block;
    color: #94a3b8;
    font-size: 0.75rem;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}
.pr-chevron-btn[aria-expanded="true"] .pr-chevron-icon,
[data-bs-toggle="collapse"][aria-expanded="true"] .pr-chevron-icon {
    transform: rotate(90deg);
    color: #2563eb !important;
}

/* Tree Submenu Hierarchy */
.pr-tree-submenu {
    border-left: 1.5px solid #e2e8f0;
    margin-left: 1.25rem;
    padding-left: 0.55rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    display: grid;
    gap: 0.15rem;
}
.pr-tree-submenu .nav-link {
    font-size: 0.835rem;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    color: #475569 !important;
    font-weight: 550;
    border-left: none;
    transition: all 0.15s ease;
}
.pr-tree-submenu .nav-link i {
    font-size: 0.95rem;
    width: 1.15rem;
    color: #2563eb !important;
}
.pr-tree-submenu .nav-link:hover {
    color: #0f172a !important;
    background: #f1f5f9 !important;
    transform: translateX(2px);
}
.pr-tree-submenu .nav-link:hover i {
    color: #1d4ed8 !important;
}
.pr-tree-submenu .nav-link.active {
    color: #1e40af !important;
    background: #eff6ff !important;
    border-left: 2.5px solid #2563eb !important;
    font-weight: 700 !important;
}
.pr-tree-submenu .nav-link.active i {
    color: #1d4ed8 !important;
}

/* Universal Classic Blue Sidebar Icons (Strictly Blue Only) */
.sidebar-nav i,
.sidebar-nav .nav-link i,
.pr-tree-submenu .nav-link i,
.pr-ai-nav-group .nav-link i,
#sidebar-marketing-ai-link i,
#sidebar-research-ai-link i,
#sidebar-pr-ai-link i,
#sidebar-sales-ai-link i,
#sidebar-compliance-ai-link i,
#sidebar-search-ad-extractor i {
    color: #2563eb !important;
}
.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i,
.pr-tree-submenu .nav-link:hover i,
.pr-tree-submenu .nav-link.active i,
.pr-ai-nav-group.is-active > div > .nav-link i {
    color: #1d4ed8 !important;
}

/* Sidebar Bottom Status Widget */
.sidebar-status {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    margin-top: 1.5rem;
}
.sidebar-status strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 750;
    color: var(--ink) !important;
}
.sidebar-status small {
    display: block;
    color: var(--muted) !important;
    font-size: 0.7rem;
    margin-top: 0.1rem;
}
.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
    position: relative;
}
.status-dot.bg-success {
    background: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: radarPulse 2.4s infinite;
}
.status-dot.bg-warning {
    background: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

@keyframes radarPulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   TOPBAR COMPONENT
   ========================================================================== */
.app-main {
    flex: 1 !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    background: var(--canvas) !important;
}
.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.85rem 2rem;
    border-bottom: 1px solid var(--border-subtle) !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
}
.topbar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink) !important;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.topbar-live-badge {
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.topbar-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: radarPulse 2s infinite;
}

/* Topbar Command Search Pill */
.topbar-quick-search {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.45rem 0.95rem;
    min-width: 320px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.topbar-quick-search:hover {
    border-color: #c7d2fe;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.06);
}
.topbar-kbd {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 750;
    padding: 2px 6px;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: #334155;
    transition: all 0.18s ease;
}
.topbar-icon-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs);
}
.notification-pip {
    position: absolute;
    width: 7px;
    height: 7px;
    top: 7px;
    right: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px #ffffff;
}

.profile-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    padding: 0.35rem 0.65rem 0.35rem 0.35rem;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    transition: all 0.15s ease;
}
.profile-button:hover {
    background: #f8fafc;
    border-color: var(--border);
}
.profile-button strong {
    color: var(--ink);
    font-weight: 750;
    font-size: 0.85rem;
    letter-spacing: -0.01em;
}
.profile-button small {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    font-weight: 800;
    font-size: 0.9rem;
}

/* ==========================================================================
   APP CONTENT & DASHBOARD HERO
   ========================================================================== */
.app-content {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    background: var(--canvas);
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.25rem 2.5rem;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, #091e42 0%, #0c2859 45%, #1e3a8a 100%);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    overflow: hidden;
}
.dashboard-hero h2 {
    margin: 0.25rem 0 0.4rem;
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff !important;
}
.dashboard-hero p {
    color: #cbd5e1;
    font-size: 0.9375rem;
    max-width: 650px;
    line-height: 1.55;
}
.eyebrow {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    display: inline-block;
    margin-bottom: 0.2rem;
}
.dashboard-hero .btn-light {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 0.55rem 1.15rem !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s ease !important;
}
.dashboard-hero .btn-light:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #1e40af !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   METRIC CARDS & PANELS - Classic Executive Aesthetics
   ========================================================================== */
.metric-card, .panel, .card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 4px 12px -2px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.metric-card {
    min-height: 108px !important;
    padding: 1.25rem 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1.15rem !important;
}
.metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}
.metric-icon {
    width: 48px !important;
    height: 48px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 12px !important;
    font-size: 1.25rem !important;
    flex-shrink: 0 !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #dbeafe !important;
}
.metric-icon i {
    color: #2563eb !important;
}
.metric-card span {
    display: block !important;
    color: #64748b !important;
    font-size: 0.8rem !important;
    font-weight: 650 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}
.metric-card strong {
    display: block !important;
    margin-top: 0.2rem !important;
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.025em !important;
    font-feature-settings: "tnum" !important;
}

.panel {
    padding: 1.5rem;
}
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}
.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ink);
}
.panel-header p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

/* Tables & Lists */
.table {
    border-collapse: separate;
    border-spacing: 0;
}
.table thead th {
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}
.table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.table tbody tr {
    transition: background-color 0.15s ease;
}
.table tbody tr:hover td {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    border-radius: 999px;
    font-weight: 650;
    letter-spacing: 0.01em;
    padding: 0.35rem 0.75rem;
}
.bg-success-subtle {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #047857 !important;
}
.bg-primary-subtle {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #1d4ed8 !important;
}
.bg-warning-subtle {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #b45309 !important;
}
.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #b91c1c !important;
}
.bg-info-subtle {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0369a1 !important;
}

/* Breadcrumbs */
.breadcrumb-item, .breadcrumb-item a {
    color: #64748b !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}
.breadcrumb-item a:hover {
    color: var(--brand) !important;
}
.breadcrumb-item.active {
    color: #0f172a !important;
    font-weight: 650 !important;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8 !important;
}

/* Dropdown Menus */
.dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05) !important;
    border-radius: 14px !important;
    padding: 0.4rem !important;
    animation: dropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdownPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item {
    color: #1e293b !important;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-weight: 550;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    transform: translateX(2px);
}
.dropdown-divider {
    border-top: 1px solid #f1f5f9 !important;
    margin: 0.35rem 0;
}

/* Integration Wrapper Controls (Outer Shell) */
.integration-topbar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
    border-radius: 14px !important;
    backdrop-filter: none !important;
    padding: 0.75rem 1.15rem !important;
}
.integration-topbar h5,
.integration-topbar h5 span {
    color: #0f172a !important;
}
.integration-topbar #serviceStatusBadge {
    background: #f8fafc !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}
.integration-topbar #serviceStatusBadge #engineStatusText {
    color: #1e293b !important;
}
.integration-topbar .btn-outline-secondary {
    background: #ffffff !important;
    color: #475569 !important;
    border-color: #e2e8f0 !important;
}
.integration-topbar .btn-outline-secondary:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
.embedded-frame-wrapper {
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
    border-radius: 14px;
    overflow: hidden;
}

/* Card Headers & Panels */
.card-header.bg-dark {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-bottom: 1px solid #e2e8f0 !important;
}
.card-header.bg-dark h1,
.card-header.bg-dark h2,
.card-header.bg-dark h3,
.card-header.bg-dark h4,
.card-header.bg-dark h5,
.card-header.bg-dark h6,
.card-header.bg-dark p,
.card-header.bg-dark span,
.card-header.bg-dark div {
    color: #0f172a !important;
}
.card-header.bg-dark .text-white-50,
.card-header.bg-dark .text-secondary {
    color: #64748b !important;
}

/* Empty States */
.empty-state { text-align: center; color: var(--muted); padding: 3rem 1.5rem; }
.empty-state i { display: block; color: var(--brand); font-size: 2.25rem; margin-bottom: 0.75rem; }
.empty-state h2 { color: var(--ink); font-weight: 800; font-size: 1.35rem; }
.empty-state-mark {
    display: inline-grid;
    place-items: center;
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    background: var(--brand-soft);
    margin-bottom: 1.25rem;
}

/* PWA Floating Installation Prompts */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    opacity: 0;
    z-index: 1060;
    width: calc(100% - 32px);
    max-width: 480px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    pointer-events: none;
}
.pwa-install-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.pwa-banner-card {
    background: rgba(23, 26, 47, 0.88);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    border-radius: 18px;
    padding: 20px;
    color: #ffffff;
}
.pwa-icon-container {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.pwa-banner-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 8px;
}
.btn-light-glow {
    background: #ffffff;
    color: #171a2f;
    font-weight: 700;
    border: 0;
    border-radius: 10px;
    padding: 8px 18px;
    font-size: 0.875rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}
.btn-light-glow:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 255, 255, 0.4);
}
.btn-light-glow:active {
    transform: translateY(0);
}

/* Staging environment overrides */
.env-staging .sidebar {
    top: 40px !important;
    height: calc(100vh - 40px) !important;
}
.env-staging .topbar {
    top: 40px !important;
}
@media (max-width: 991.98px) {
    .env-staging .sidebar {
        top: 40px !important;
        height: calc(100vh - 40px) !important;
    }
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
        height: 100vh !important;
        overflow-y: auto !important;
        background: #ffffff !important;
    }
    body.sidebar-open .sidebar {
        transform: translateX(0) !important;
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
    }
    body.sidebar-open .sidebar-backdrop { display: block; }
    .app-main { margin-left: 0 !important; }
    .topbar, .app-content { padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (max-width: 575.98px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.5rem;
    }
    .dashboard-hero .btn { width: 100%; }
    .app-content { padding-top: 1.25rem; padding-left: 1rem; padding-right: 1rem; }
}

/* ==========================================================================
   AUTHENTICATION & GUEST PAGES (Classic Enterprise Style)
   ========================================================================== */
.auth-body {
    background: #f8fafc;
    min-height: 100vh;
}
.auth-showcase {
    background: linear-gradient(135deg, #091e42 0%, #0c2859 45%, #1e3a8a 100%);
    color: #ffffff;
    padding: 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.auth-showcase::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.25) 0%, transparent 60%);
    pointer-events: none;
}
.auth-showcase-content {
    position: relative;
    z-index: 2;
    max-width: 580px;
}
.auth-showcase h1 {
    color: #ffffff !important;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 1rem 0;
    letter-spacing: -0.025em;
}
.auth-showcase p {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.6;
}
.showcase-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}
.showcase-stat strong {
    display: block;
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 800;
}
.showcase-stat span {
    font-size: 0.75rem;
    color: #93c5fd;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-card {
    max-width: 440px;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}
.security-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1.5rem;
    text-align: center;
}
