/* KYRO Risk Assessment Specialist - Custom Bootstrap 5 Theme */

:root {
    /* KYRO Brand Colors */
    --kyro-primary: #1a237e;
    --kyro-primary-rgb: 26, 35, 126;
    --kyro-secondary: #3949ab;
    --kyro-secondary-rgb: 57, 73, 171;
    --kyro-success: #43a047;
    --kyro-success-rgb: 67, 160, 71;
    --kyro-warning: #fb8c00;
    --kyro-warning-rgb: 251, 140, 0;
    --kyro-danger: #e53935;
    --kyro-danger-rgb: 229, 57, 53;
    --kyro-info: #039be5;
    --kyro-info-rgb: 3, 155, 229;

    /* Background Colors */
    --kyro-bg: #f9fbff;
    --kyro-bg-secondary: #ffffff;
    --kyro-sidebar: #ffffff;
    --kyro-sidebar-text: #2c3e50;
    --kyro-sidebar-hover-bg: #f8f9fa;
    --kyro-sidebar-hover-text: #1a237e;
    --kyro-sidebar-active-bg: #e8eaf6;
    --kyro-sidebar-active-text: #1a237e;
    --kyro-sidebar-border: #e2e8f0;

    /* Text Colors */
    --kyro-text-primary: #2c3e50;
    --kyro-text-secondary: #7b8794;
    --kyro-text-muted: #95a5a6;

    /* Shadow & Border */
    --kyro-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --kyro-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
    --kyro-border-radius: 12px;
    --kyro-border: #dee2e6;
    --kyro-border-subtle: #f8f9fa;

    /* Risk Level Colors */
    --risk-low: #43a047;
    --risk-low-bg: rgba(67, 160, 71, 0.1);
    --risk-medium: #fb8c00;
    --risk-medium-bg: rgba(251, 140, 0, 0.1);
    --risk-high: #e53935;
    --risk-high-bg: rgba(229, 57, 53, 0.1);
}

/* AML Dashboard CSS Variables - From aml-dashboard.html */
:root {
    --aml-orange: #f97a3c;
    --aml-dark: #2b3444;
    --aml-text: #1c2430;
    --aml-muted: #9aa3b2;
    --aml-grid: #e8eaef;
    --aml-bg: #f7f8fa;
    --aml-card: #ffffff;
    --aml-border: #eceef2;
}

/* AML Card - Exact from aml-dashboard.html */
.aml-card {
    background: var(--aml-card);
    border: 1px solid var(--aml-border);
    border-radius: 14px;
    padding: 24px 28px;
    box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
}

.aml-card h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--aml-text);
    margin: 0 0 4px 0;
}

.aml-card .aml-subtitle,
.aml-subtitle {
    font-size: 13.5px;
    color: var(--aml-muted);
    margin: 0;
}

/* Legend chip */
.aml-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--aml-text);
}

.aml-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aml-dot.orange {
    background: var(--aml-orange);
}

.aml-dot.dark {
    background: var(--aml-dark);
}

/* Bar Chart - Exact from aml-dashboard.html */
.aml-chart-legend {
    margin: 22px 0 18px;
}

.aml-chart {
    position: relative;
    height: 220px;
    margin-left: 38px;
}

.aml-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--aml-grid);
}

.aml-gridline span {
    position: absolute;
    left: -38px;
    top: -7px;
    font-size: 11.5px;
    color: var(--aml-muted);
}

.aml-gridline:nth-child(1) {
    top: 0%;
}

.aml-gridline:nth-child(2) {
    top: 25%;
}

.aml-gridline:nth-child(3) {
    top: 50%;
}

.aml-gridline:nth-child(4) {
    top: 75%;
}

.aml-gridline:nth-child(5) {
    top: 100%;
}

.aml-bars {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 40px;
}

.aml-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.aml-bar {
    width: 26px;
    border-radius: 13px;
}

.aml-bar.dark {
    background: var(--aml-dark);
}

.aml-bar.orange {
    background: var(--aml-orange);
}

.aml-x-label {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: var(--aml-muted);
}

/* Donut Chart - Exact from aml-dashboard.html */
.aml-donut-card {
    display: flex;
    flex-direction: column;
}

.aml-donut-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.aml-donut {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle, transparent 62px, #000 63px);
    mask: radial-gradient(circle, transparent 62px, #000 63px);
}

.aml-donut-legend {
    display: flex;
    justify-content: center;
    gap: 22px;
    border-top: 1px solid var(--aml-border);
    padding-top: 16px;
}

/* Responsive for AML cards */
@media (max-width: 900px) {
    .aml-card {
        padding: 20px;
    }

    /* Stack cards on mobile */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Review Case Volume CSS Specifications - Exact Tailwind Match */
.review-case-volume-container {
    --tw-bg-opacity: 1;
    background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
    /* bg-white */
    --tw-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
    --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    /* shadow */
    padding: 1rem;
    /* p-4 */
    width: 100%;
    /* w-full */
    max-width: 100%;
    /* max-w-full */
    min-height: 350px;
    border-radius: 12px;
    border: 0 solid #e5e7eb;
    box-sizing: border-box;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .2s;
}

/* For Desktop screens (lg) */
@media (min-width: 1024px) {
    .review-case-volume-container {
        padding: 1.5rem;
        /* lg:p-6 */
        width: 754px;
        /* lg:w-[754px] */
    }
}

.heading-h5 {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #1F2937;
    /* text-gray-800 */
    margin-bottom: 4px;
    margin-top: 0;
}

.sub-text {
    font-size: 14px;
    /* text-sm */
    color: #9CA3AF;
    /* text-gray-400 */
    margin: 0;
}

.orange-dot {
    width: 12px;
    /* w-3 */
    height: 12px;
    /* h-3 */
    background-color: #FF8C42;
    /* bg-orange-500 (orange accent) */
    border-radius: 9999px;
    /* rounded-full */
    display: inline-block;
}

.period-text {
    font-size: 12px;
    /* text-xs */
    color: #6B7280;
    /* text-gray-500 */
}

/* Custom Bootstrap Color Classes */
.bg-kyro-primary {
    background-color: var(--kyro-primary) !important;
}

.bg-kyro-secondary {
    background-color: var(--kyro-secondary) !important;
}

.bg-kyro-sidebar {
    background-color: var(--kyro-sidebar) !important;
}

.text-kyro-primary {
    color: var(--kyro-primary) !important;
}

.text-kyro-secondary {
    color: var(--kyro-secondary) !important;
}

/* Custom Header/Navbar Styling */
.kyro-navbar {
    background-color: #ffffff !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
    z-index: 1050;
}

.kyro-navbar-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    height: 64px;
    background-color: transparent;
    width: 100%;
}

.kyro-navbar-row2 {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    height: 48px;
    background-color: transparent;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.kyro-navbar-row2::-webkit-scrollbar {
    display: none;
}

@media (min-width: 1200px) {

    .kyro-navbar-row1,
    .kyro-navbar-row2 {
        padding: 0 3rem;
    }
}

.kyro-navbar .navbar-brand {
    color: var(--kyro-text-primary) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.kyro-navbar .brand-logo-text {
    color: #111827;
    transition: color 0.2s ease;
}

[data-theme="dark"] .kyro-navbar .brand-logo-text {
    color: var(--kyro-text-primary);
}

.kyro-navbar .navbar-brand small {
    color: var(--kyro-text-secondary) !important;
}

/* Make search bar input look premium */
.kyro-navbar #globalSearch {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    color: var(--kyro-text-primary);
    border-radius: 20px !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    height: 38px;
    padding-left: 1rem !important;
    padding-right: 2.5rem !important;
    transition: all 0.2s ease;
}

.kyro-navbar #globalSearch:focus {
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15) !important;
    border-color: #FF8C42 !important;
    background-color: #ffffff;
}

.kyro-navbar .input-group .btn-outline-light {
    border-color: rgba(124, 143, 172, 0.15) !important;
    background-color: #f5f6fa !important;
    color: var(--kyro-text-secondary) !important;
    border-radius: 0 8px 8px 0 !important;
}

.kyro-navbar .input-group .btn-outline-light:hover {
    background-color: #e2e8f0 !important;
    color: var(--kyro-text-primary) !important;
}

/* Navbar action buttons */
.kyro-navbar .btn-outline-light {
    border-color: rgba(124, 143, 172, 0.12) !important;
    background-color: #ffffff !important;
    color: var(--kyro-text-primary) !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.kyro-navbar .btn-outline-light:hover {
    background-color: #f5f6fa !important;
    color: var(--kyro-primary) !important;
    border-color: rgba(124, 143, 172, 0.25) !important;
}

.kyro-navbar .dropdown-toggle {
    color: var(--kyro-text-primary) !important;
}

.kyro-navbar .dropdown-toggle::after {
    color: var(--kyro-text-secondary) !important;
}

/* Dark Theme support for header */
[data-theme="dark"] .kyro-navbar {
    background-color: var(--kyro-bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .kyro-navbar-row2 {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .kyro-navbar #globalSearch {
    background-color: var(--kyro-bg) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--kyro-text-primary) !important;
}

[data-theme="dark"] .kyro-navbar #globalSearch:focus {
    background-color: var(--kyro-bg-secondary) !important;
}

[data-theme="dark"] .kyro-navbar .btn-outline-light {
    background-color: var(--kyro-bg-secondary) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--kyro-text-primary) !important;
}

/* Navigation & Sidebar */
.sidebar {
    background-color: #ffffff !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(124, 143, 172, 0.12) !important;
}

.sidebar,
.offcanvas {
    overflow-y: auto;
}

.offcanvas {
    background-color: #ffffff !important;
    border-right: 1px solid rgba(124, 143, 172, 0.12) !important;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(124, 143, 172, 0.12);
    color: var(--kyro-sidebar-text);
}

.sidebar .nav-link,
.offcanvas .nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568 !important;
    padding: 12px 24px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.offcanvas .nav-link:hover {
    background-color: #f8fafc !important;
    color: var(--kyro-primary) !important;
    border-left-color: #FF8D28 !important;
    /* Orange accent on hover */
}

.sidebar .nav-link.active,
.offcanvas .nav-link.active {
    background-color: #e8f0fe !important;
    color: var(--kyro-primary) !important;
    border-left-color: var(--kyro-primary) !important;
    font-weight: 600;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] .offcanvas {
    background-color: var(--kyro-bg-secondary) !important;
    border-right-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .sidebar .nav-link,
[data-theme="dark"] .offcanvas .nav-link {
    color: var(--kyro-text-secondary) !important;
}

[data-theme="dark"] .sidebar .nav-link:hover,
[data-theme="dark"] .offcanvas .nav-link:hover {
    background-color: var(--kyro-bg) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .sidebar .nav-link.active,
[data-theme="dark"] .offcanvas .nav-link.active {
    background-color: rgba(26, 35, 126, 0.2) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* Cards & KPI Components */
.card {
    border: none;
    border-radius: var(--kyro-border-radius);
    box-shadow: var(--kyro-shadow);
    transition: all 0.3s ease;
    background-color: var(--kyro-bg-secondary);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kyro-shadow-hover);
}

.kpi-card {
    border: none;
    border-radius: var(--kyro-border-radius);
    box-shadow: var(--kyro-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kyro-shadow-hover);
}

.kpi-card .card-body {
    padding: 1.5rem;
}

.kpi-card h6 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.kpi-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.kpi-card .icon {
    opacity: 0.3;
}

/* Risk Score Components */
.risk-score-bar {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
    position: relative;
}

.risk-score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.risk-score-fill.risk-low {
    background: linear-gradient(90deg, var(--risk-low), #4caf50);
}

.risk-score-fill.risk-medium {
    background: linear-gradient(90deg, var(--risk-medium), #ff9800);
}

.risk-score-fill.risk-high {
    background: linear-gradient(90deg, var(--risk-high), #f44336);
}

.risk-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.risk-badge.risk-low {
    background: var(--risk-low-bg);
    color: var(--risk-low);
}

.risk-badge.risk-medium {
    background: var(--risk-medium-bg);
    color: var(--risk-medium);
}

.risk-badge.risk-high {
    background: var(--risk-high-bg);
    color: var(--risk-high);
}

/* Alert Row Styling */
.alert-row-high {
    border-left: 4px solid var(--kyro-danger);
    background: rgba(229, 57, 53, 0.02);
}

.alert-row-medium {
    border-left: 4px solid var(--kyro-warning);
    background: rgba(251, 140, 0, 0.02);
}

.alert-row-low {
    border-left: 4px solid var(--kyro-success);
    background: rgba(67, 160, 71, 0.02);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 1rem 0;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
}

.table thead th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    background: var(--kyro-bg);
    color: var(--kyro-text-secondary);
}

.table tbody tr:hover {
    background: rgba(26, 35, 126, 0.02);
}

/* Button Enhancements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.2);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Toast Notifications */
.toast-container {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 1250 !important; /* Above dropdown (1200) */
    pointer-events: none !important; /* Don't block clicks or layout */
}

.toast-container .toast {
    pointer-events: auto !important; /* But toasts themselves should be clickable */
}

.toast {
    border: none;
    border-radius: var(--kyro-border-radius);
    box-shadow: var(--kyro-shadow-hover);
    backdrop-filter: blur(10px);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--kyro-border-radius) var(--kyro-border-radius) 0 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    background: white;
    border-radius: var(--kyro-border-radius);
    padding: 1rem;
    box-shadow: var(--kyro-shadow);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--kyro-success);
}

.status-dot.offline {
    background: var(--kyro-danger);
}

.status-dot.warning {
    background: var(--kyro-warning);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Progress Bars */
.progress {
    border-radius: 6px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--kyro-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.25);
}

.input-group-text {
    background: var(--kyro-bg);
    border-color: #dee2e6;
}

/* Search Enhancements */
.search-highlight {
    background: rgba(26, 35, 126, 0.1);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .sidebar {
        width: 100% !important;
    }

    .kpi-card h2 {
        font-size: 1.5rem;
    }

    .chart-container {
        height: 250px;
    }
}

@media (max-width: 575.98px) {
    .kpi-card .card-body {
        padding: 1rem;
    }

    .kpi-card h2 {
        font-size: 1.25rem;
    }

    .chart-container {
        height: 200px;
        padding: 0.5rem;
    }

    .navbar-brand>div>div {
        font-size: 0.9rem;
    }

    .navbar-brand>div>small {
        font-size: 0.7rem;
    }
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --kyro-bg: #090c15;
    --kyro-bg-secondary: #131722;
    --kyro-text-primary: #f1f5f9;
    --kyro-text-secondary: #94a3b8;
    --kyro-text-muted: #64748b;
    --kyro-sidebar: #131722;
    --kyro-sidebar-text: #94a3b8;
    --kyro-sidebar-hover-bg: #1e293b;
    --kyro-sidebar-hover-text: #ffffff;
    --kyro-sidebar-active-bg: #1e293b;
    --kyro-sidebar-active-text: #ffffff;
    --kyro-sidebar-border: #1e293b;
    --kyro-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    --kyro-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.35);
    --kyro-border: #1e293b;
    --kyro-border-subtle: #161e2e;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --kyro-bg: #090c15;
        --kyro-bg-secondary: #131722;
        --kyro-text-primary: #f1f5f9;
        --kyro-text-secondary: #94a3b8;
        --kyro-text-muted: #64748b;
        --kyro-sidebar: #131722;
        --kyro-sidebar-text: #94a3b8;
        --kyro-sidebar-hover-bg: #1e293b;
        --kyro-sidebar-hover-text: #ffffff;
        --kyro-sidebar-active-bg: #1e293b;
        --kyro-sidebar-active-text: #ffffff;
        --kyro-sidebar-border: #1e293b;
        --kyro-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
        --kyro-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.35);
        --kyro-border: #1e293b;
        --kyro-border-subtle: #161e2e;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .toast-container,
    .loading-overlay {
        display: none !important;
    }

    .col-12 {
        width: 100% !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* Horizontal Top Navbar Navigation Links Styles */
.kyro-navbar .navbar-nav {
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
}

.kyro-navbar .navbar-nav .nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563 !important;
    padding: 0 8px !important;
    border-bottom: 2px solid transparent !important;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none !important;
}

.kyro-navbar .navbar-nav .nav-link:hover {
    color: #FF8C42 !important;
    border-bottom-color: #FF8C42 !important;
}

.kyro-navbar .navbar-nav .nav-link.active {
    color: #FF8C42 !important;
    border-bottom-color: #FF8C42 !important;
}

.kyro-navbar .border-top {
    border-top: 1px solid rgba(124, 143, 172, 0.12) !important;
}

/* Scrollbar hiding utilities */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Layout container margin for horizontal top bar */
.main-layout-container {
    margin-top: 130px !important;
    padding-bottom: 40px;
}

/* Dark theme styling for navbar links */
[data-theme="dark"] .kyro-navbar .navbar-nav .nav-link {
    color: var(--kyro-text-secondary) !important;
}

[data-theme="dark"] .kyro-navbar .navbar-nav .nav-link:hover {
    color: #FF8D28 !important;
    border-bottom-color: #FF8D28 !important;
}

[data-theme="dark"] .kyro-navbar .navbar-nav .nav-link.active {
    color: #FF8D28 !important;
    border-bottom-color: #FF8D28 !important;
}

@media (max-width: 991.98px) {
    .kyro-navbar .navbar-nav {
        flex-direction: row !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }

    .kyro-navbar .navbar-nav .nav-link {
        padding: 0 4px !important;
        height: 100% !important;
        border-bottom: 2px solid transparent !important;
        border-left: none !important;
    }

    .kyro-navbar .navbar-nav .nav-link:hover,
    .kyro-navbar .navbar-nav .nav-link.active {
        border-bottom-color: #FF8D28 !important;
        background-color: transparent !important;
    }

    .main-layout-container {
        margin-top: 130px !important;
    }
}

/* Kyro Chat UI specific utilities */
.bg-orange {
    background-color: #ff8d28 !important;
}

.btn-purple {
    background-color: #8250df !important;
    border-color: #8250df !important;
    color: #ffffff !important;
}

.btn-purple:hover {
    background-color: #6b3fc5 !important;
    border-color: #6b3fc5 !important;
    color: #ffffff !important;
}

.text-purple {
    color: #8250df !important;
}

.fs-8 {
    font-size: 0.8rem !important;
}

.fs-9 {
    font-size: 0.7rem !important;
}

.max-w-75 {
    max-width: 75% !important;
}

.whitespace-pre-wrap {
    white-space: pre-wrap !important;
}

.gap-2.5 {
    gap: 0.625rem !important;
}

.match-height-container {
    display: flex;
    flex-wrap: wrap;
}

.match-height-container>div {
    display: flex;
    flex-direction: column;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #64748b;
}

/* Kyro Chat UI Components */

/* Bootstrap container override — keeps chat layout within 960px on large screens */
.kyro-chat-container {
    max-width: 960px !important;
}

.kyro-chat-card {
    border-radius: 12px;
    background-color: #ffffff;
    min-height: 520px;
    border: 1px solid #eef0f2 !important;
}

.kyro-chat-neural-status {
    background-color: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.kyro-chat-live-status {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
}

.kyro-chat-history {
    max-height: 240px;
}

.kyro-chat-bubble-user {
    border-radius: 12px 12px 0 12px !important;
    background-color: #ff8d28;
    font-size: 12.5px;
    max-width: 80%;
    color: #ffffff !important;
    padding: 8px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kyro-chat-bubble-assistant {
    border-radius: 12px 12px 12px 0 !important;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0 !important;
    font-size: 12.5px;
    max-width: 80%;
    color: #334155;
    padding: 8px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kyro-chat-input {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    background-color: #ffffff;
    box-shadow: none;
}

.kyro-chat-input:focus {
    border-color: #ff8d28;
    box-shadow: 0 0 0 2px rgba(255, 141, 40, 0.15);
}

.kyro-chat-handoff-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: #ffb07c;
    border: none;
    color: white;
    transition: all 0.2s ease;
}

.kyro-chat-handoff-btn:hover {
    background-color: #ff8d28;
    color: white;
}

.kyro-chat-video-card {
    border-radius: 12px;
    border: 1px solid #eef0f2 !important;
    background: #f9f9f9;
    overflow: hidden;
}

.kyro-chat-video-wrapper {
    height: 480px;
    width: 100%;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kyro-chat-video {
    /* cover = character fills container correctly */
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
}

.kyro-chat-floating-pill {
    border-radius: 20px;
    font-size: 11px;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Support for Kyro Chat */
[data-theme="dark"] .kyro-chat-card,
[data-theme="dark"] .kyro-chat-video-card {
    background-color: var(--kyro-bg-secondary);
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .kyro-chat-neural-status {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .kyro-chat-live-status {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .kyro-chat-bubble-assistant {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kyro-chat-input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kyro-chat-input::placeholder {
    color: var(--kyro-text-muted);
}

[data-theme="dark"] .kyro-chat-video-wrapper {
    background-color: #111827;
}

[data-theme="dark"] .kyro-chat-floating-pill {
    background-color: var(--kyro-bg-secondary);
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--kyro-text-secondary) !important;
}

/* User Profile Dropdown & Header Controls Styles */
.kyro-user-text {
    color: #1f2937;
}

[data-theme="dark"] .kyro-user-text {
    color: #f3f4f6 !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: var(--kyro-bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--kyro-text-primary) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--kyro-bg) !important;
    color: #FF8D28 !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .dropdown-item-text {
    color: var(--kyro-text-secondary) !important;
}

[data-theme="dark"] #userDropdownName {
    color: var(--kyro-text-primary) !important;
}

[data-theme="dark"] #userDropdownRole {
    background-color: var(--kyro-bg) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #FF8D28 !important;
}

/* User Profile Dropdown - Clean & Working */
.dropdown {
    position: relative !important;
    z-index: 1150 !important;
}

.dropdown-menu {
    position: fixed !important;
    z-index: 9999 !important;
    min-width: 240px !important;
    padding: 0.5rem !important;
    margin-top: 0.5rem !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateZ(0) !important; /* GPU acceleration */
    will-change: transform !important; /* Optimize for repositioning */
}

.dropdown-menu.show {
    position: fixed !important;
}

.dropdown-menu li {
    list-style: none !important;
}

.dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.625rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: #f3f4f6 !important;
    color: #1f2937 !important;
}

.dropdown-menu .dropdown-item i {
    color: #6b7280 !important;
    transition: color 0.2s ease !important;
}

.dropdown-menu .dropdown-item:hover i {
    color: #FF8C42 !important;
}

#logoutBtn.text-danger {
    color: #dc2626 !important;
}

#logoutBtn:hover {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

#logoutBtn:hover i {
    color: #dc2626 !important;
}

.dropdown-divider {
    margin: 0.5rem 0 !important;
    border-top: 1px solid #e5e7eb !important;
}

/* Main content lower z-index */
.main-layout-container {
    position: relative !important;
    z-index: 1 !important;
}

/* Prevent overflow hidden on parent containers */
.kyro-navbar,
.kyro-navbar > div {
    overflow: visible !important;
}

/* Ensure header is not clipping dropdown */
header.kyro-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
    overflow: visible !important;
}

/* User info section in dropdown */
.dropdown-menu li:first-child {
    padding: 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin-bottom: 8px !important;
}

/* Prevent overflow hidden on parent containers */
.kyro-navbar,
.kyro-navbar > div {
    overflow: visible !important;
}

/* Ensure header is not clipping dropdown */
header.kyro-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
    overflow: visible !important;
}

/* Kyro Chat Container Styles - Chat App Layout */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #ffffff;
}

/* Header Section */
.chat-header {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #ffffff;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Kyro Avatar */
.kyro-avatar {
    position: relative;
    width: 5rem;
    height: 6rem;
    flex-shrink: 0;
}

.avatar-container {
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.avatar-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status indicators */
.status-dot {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-running {
    background-color: #10b981;
}

.status-paused {
    background-color: #f59e0b;
}

.status-stopped {
    background-color: #6b7280;
}

.status-error {
    background-color: #ef4444;
}

.status-default {
    background-color: #3b82f6;
}

/* Header Info */
.header-info {
    min-width: 0;
    flex: 1;
}

.header-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kyro-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin: 0;
}

.subtitle {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    display: none;
}

.version-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ea580c;
    background-color: #fed7aa;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Connection status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.125rem;
}

.loading-spinner {
    width: 0.5rem;
    height: 0.5rem;
    border: 2px solid #9ca3af;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.status-tags {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.status-tag {
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    background-color: #f9fafb;
}

/* Messages Area */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1.5rem;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Live status panel */
.status-panel {
    border-radius: 0.75rem;
    border: 2px solid;
    padding: 1rem;
}

/* Status colors */
.status-running {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.status-paused {
    color: #92400e;
    background-color: #fef3c7;
    border-color: #fde68a;
}

.status-error {
    color: #991b1b;
    background-color: #fee2e2;
    border-color: #fca5a5;
}

.status-default {
    color: #374151;
    background-color: #f9fafb;
    border-color: #e5e7eb;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pulse-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.pulse-running {
    background-color: #10b981;
    animation: pulse 2s infinite;
}

.pulse-default {
    background-color: #6b7280;
}

.status-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.sync-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.status-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-pulse-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #4b5563;
}

/* Run Stats */
.run-stats {
    border-radius: 0.75rem;
    border: 2px solid #fed7aa;
    background-color: rgba(254, 215, 170, 0.8);
    padding: 1rem;
}

.run-stats-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9a3412;
    margin-bottom: 0.5rem;
}

.run-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    font-size: 0.875rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #92400e;
}

.stat-value {
    font-weight: 700;
}

.stat-actions {
    color: #1c1917;
}

.stat-success {
    color: #166534;
}

.stat-failure {
    color: #991b1b;
}

/* Message Bubbles */
.message-row {
    display: flex;
    gap: 0.75rem;
}

.message-user {
    justify-content: flex-end;
}

.message-assistant {
    justify-content: flex-start;
}

/* Mini avatar for messages */
.message-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2.5rem;
    position: relative;
}

.message-avatar-container {
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.message-status-dot {
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    border: 1px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Message bubble */
.message-bubble {
    max-width: 88%;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bubble-user {
    background-color: #ea580c;
    color: #ffffff;
}

.bubble-assistant {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

/* Message content */
.message-text {
    font-size: 0.875rem;
    white-space: pre-wrap;
    line-height: 1.5;
    margin: 0;
}

.message-timestamp {
    margin-top: 0.5rem;
    font-size: 0.625rem;
}

.timestamp-user {
    color: rgba(255, 255, 255, 0.7);
}

.timestamp-assistant {
    color: #9ca3af;
}

/* Loading State */
.loading-message {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
}

.loading-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background-color: #ea580c;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-face {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #ffffff;
    border-radius: 0.5rem;
    position: relative;
}

.loading-eyes {
    position: absolute;
    top: 0.375rem;
    width: 0.25rem;
    height: 0.25rem;
    background-color: #ea580c;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.eye-left {
    left: 0.125rem;
}

.eye-right {
    right: 0.125rem;
}

.loading-mouth {
    position: absolute;
    bottom: 0.125rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.625rem;
    height: 0.125rem;
    background-color: #ea580c;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.loading-bubble {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
}

.loading-text {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Input Area */
.input-container {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    padding-bottom: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #ffffff;
}

/* Control buttons */
.control-buttons {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.control-button {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.control-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-start {
    background-color: #059669;
}

.btn-start:hover {
    background-color: #047857;
}

.btn-start:active {
    background-color: #065f46;
}

.btn-pause {
    background-color: #d97706;
}

.btn-pause:hover {
    background-color: #b45309;
}

.btn-resume {
    background-color: #2563eb;
}

.btn-resume:hover {
    background-color: #1d4ed8;
}

.btn-resume:active {
    background-color: #1e40af;
}

.btn-handoff {
    background-color: #7c3aed;
}

.btn-handoff:hover {
    background-color: #6d28d9;
}

.btn-handoff:active {
    background-color: #5b21b6;
}

.btn-stop {
    background-color: #dc2626;
}

.btn-stop:hover {
    background-color: #b91c1c;
}

.btn-stop:active {
    background-color: #991b1b;
}

.btn-disabled {
    background-color: #d1d5db;
    color: #4b5563;
    cursor: not-allowed;
}

/* Status messages */
.intervention-notice {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #7c2d12;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

.autonomous-notice {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #92400e;
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

.instruction-text {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Input form */
.input-form {
    display: flex;
    gap: 0.75rem;
}

.message-input {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1f2937;
    resize: none;
    transition: border-color 0.2s;
}

.message-input::placeholder {
    color: #9ca3af;
}

.message-input:focus {
    outline: none;
    border-color: #ea580c;
}

.send-button {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #ea580c;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover {
    background-color: #dc2626;
}

.send-button:active {
    background-color: #b91c1c;
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Responsive adjustments */
@media (min-width: 640px) {
    .kyro-avatar {
        width: 5rem;
        height: 6rem;
    }

    .status-dot {
        width: 0.75rem;
        height: 0.75rem;
    }

    .subtitle {
        display: inline;
    }

    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .run-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .message-bubble {
        max-width: 82%;
    }

    .send-button {
        width: auto;
        height: auto;
        padding: 0.75rem 1.25rem;
    }
}

/* Dark theme support for chat container */
[data-theme="dark"] .chat-container {
    background-color: var(--kyro-bg-secondary);
}

[data-theme="dark"] .chat-header {
    background-color: var(--kyro-bg-secondary);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .kyro-title,
[data-theme="dark"] .subtitle {
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .status-tag {
    background-color: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--kyro-text-secondary);
}

[data-theme="dark"] .bubble-assistant {
    background-color: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .loading-bubble {
    background-color: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .loading-text {
    color: var(--kyro-text-secondary);
}

[data-theme="dark"] .input-container {
    background-color: var(--kyro-bg-secondary);
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .message-input {
    background-color: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .message-input::placeholder {
    color: var(--kyro-text-muted);
}

/* =============================================

/* =============================================
   KYRO CHAT PAGE — kc-* namespace
   ============================================= */

/* Outer wrapper — fills main content area */
.kc-wrapper {
    padding: 20px 24px 32px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Main two-column grid ── */
.kc-layout {
    display: grid;
    grid-template-columns: 68% 30%;
    gap: 24px;
    align-items: stretch;
}

/* Tablet & Mobile Responsiveness - Scalable stacking without hiding character video */
@media (max-width: 992px) {
    .kc-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .kc-right-panel {
        display: block !important;
        order: -1;
        /* Display video avatar on top for smaller screens */
    }

    .kc-video-card {
        height: 320px;
        min-height: 260px;
        border-radius: 14px;
    }

    .kc-char-video {
        max-height: 320px;
        object-fit: contain;
    }

    .kc-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .kc-wrapper {
        padding: 16px 12px 24px;
    }

    .kc-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .kc-agent-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .kc-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .kc-btn {
        width: 100%;
        text-align: center;
        padding: 10px 12px;
    }

    .kc-video-card {
        height: 240px;
        min-height: 200px;
    }
}

/* ── LEFT PANEL ── */
.kc-left-panel {
    display: flex;
    flex-direction: column;
}

/* Single outer card — matches screenshot border */
.kc-main-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    width: 100%;
}

/* Agent card — no own border, lives inside main card */
.kc-agent-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.kc-agent-avatar {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.kc-agent-info {
    flex: 1;
    min-width: 0;
}

.kc-agent-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kc-agent-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
}

.kc-v-badge {
    font-size: 10px;
    font-weight: 700;
    background: #fff0e0;
    color: #FF8C42;
    padding: 2px 7px;
    border-radius: 4px;
}

.kc-neural {
    font-size: 11px;
    color: #6b7280;
    margin: 3px 0 6px;
}

.kc-state-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #64748b;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
}

.kc-agent-desc {
    font-size: 11.5px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Live status box — inset inside main card */
.kc-status-card {
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 14px;
    transition: background 0.25s, border-color 0.25s;
}

.kc-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.kc-status-lhs {
    display: flex;
    align-items: center;
    gap: 7px;
}

.kc-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    flex-shrink: 0;
    transition: background 0.25s;
}

.kc-status-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.kc-sync-time {
    font-size: 11px;
    color: #9ca3af;
}

.kc-processing {
    font-size: 12px;
    color: #4b5563;
    margin-bottom: 5px;
}

.kc-processing strong {
    color: #111827;
}

.kc-pulse-label {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.6;
}

/* Run stats — inset inside main card */
.kc-stats-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 12px 14px;
}

.kc-stats-title {
    font-size: 12px;
    font-weight: 600;
    color: #9a3412;
    margin-bottom: 8px;
}

.kc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.kc-sl {
    font-size: 10px;
    color: #92400e;
    margin-bottom: 2px;
}

.kc-sv {
    font-size: 15px;
    font-weight: 700;
    color: #1c1917;
}

.kc-sv-ok {
    color: #166534;
}

.kc-sv-err {
    color: #991b1b;
}

/* Chat messages */
.kc-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 2px;
}

.kc-messages:empty {
    display: none;
}

.kc-msg {
    display: flex;
    gap: 8px;
}

.kc-msg-user {
    justify-content: flex-end;
}

.kc-msg-bot {
    justify-content: flex-start;
    align-items: flex-end;
}

.kc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.kc-bubble {
    max-width: 82%;
    padding: 9px 13px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 14px;
}

.kc-bubble-user {
    background: #FF8C42;
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}

.kc-bubble-bot {
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 14px 14px 14px 4px;
}

.kc-msg-text {
    margin: 0;
}

.kc-msg-time {
    font-size: 10px;
    margin-top: 4px;
}

.kc-time-user {
    color: rgba(255, 255, 255, 0.7);
}

.kc-time-bot {
    color: #94a3b8;
}

/* Control buttons */
.kc-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kc-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.15s, transform 0.1s;
}

.kc-btn:hover {
    opacity: 0.88;
}

.kc-btn:active {
    transform: scale(0.97);
}

.kc-btn-start {
    background: #16a34a;
}

.kc-btn-pause {
    background: #d97706;
}

.kc-btn-resume {
    background: #2563eb;
}

.kc-btn-stop {
    background: #dc2626;
}

.kc-btn-handoff {
    background: #7c3aed;
}

/* Instruction line */
.kc-instruction {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

/* Notices */
.kc-notice {
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
}

.kc-notice-int {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.kc-notice-auto {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Input row */
.kc-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.kc-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.kc-input:focus {
    border-color: #FF8C42;
    box-shadow: 0 0 0 2px rgba(255, 140, 66, 0.12);
}

.kc-input::placeholder {
    color: #9ca3af;
}

.kc-send-btn {
    width: 40px;
    height: 40px;
    background: #FF8C42;
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.kc-send-btn:hover {
    background: #e8751f;
}

/* ── RIGHT PANEL ── */
.kc-right-panel {
    /* stretch to match left panel height via grid */
}

.kc-video-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.kc-idle-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    z-index: 2;
}

.kc-idle-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    transition: background 0.25s;
}

.kc-char-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

/* Dark theme */
[data-theme="dark"] .kc-page-title {
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kc-agent-card,
[data-theme="dark"] .kc-status-card,
[data-theme="dark"] .kc-video-card {
    background: var(--kyro-bg-secondary);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .kc-agent-name,
[data-theme="dark"] .kc-status-label {
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kc-bubble-bot {
    background: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kc-input {
    background: var(--kyro-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--kyro-text-primary);
}

[data-theme="dark"] .kc-input::placeholder {
    color: var(--kyro-text-muted);
}

[data-theme="dark"] .kc-idle-pill {
    background: var(--kyro-bg-secondary);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--kyro-text-primary);
}

/* Page header row */
.kc-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.kc-page-icon {
    width: 42px;
    height: 42px;
    background: #FF8C42;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    flex-shrink: 0;
}

.kc-page-title {
    font-size: 21px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.25;
}

.kc-page-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}


/* =============================================
   AML PERIODIC REVIEWS - From aml-periodic-reviews.html
   ============================================= */

:root {
    --pr-green: #1fb877;
    --pr-red: #ee4444;
    --pr-amber: #f5a623;
    --pr-blue: #3b82f6;
    --pr-blue-bg: #e7effd;
    --pr-green-bg: #e4f7ee;
    --pr-amber-bg: #fdf0dd;
}

/* Buttons */
.aml-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.aml-btn-secondary {
    background: var(--aml-bg);
    border-color: var(--aml-border);
    color: var(--aml-text);
}

.aml-btn-secondary:hover {
    background: #eff1f5;
}

.aml-btn-primary {
    background: #f26a22;
    color: #fff;
    box-shadow: 0 2px 6px rgba(242, 106, 34, 0.35);
}

.aml-btn-primary:hover {
    background: #e05f1a;
}

/* Cards Grid */
.aml-pr-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

.aml-pr-card {
    background: var(--aml-card);
    border: 1px solid var(--aml-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(20, 28, 40, 0.04);
    display: flex;
    flex-direction: column;
    height: 370px;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Stagger animation for cards */
.aml-pr-card:nth-child(1) {
    animation-delay: 0.1s;
}

.aml-pr-card:nth-child(2) {
    animation-delay: 0.2s;
}

.aml-pr-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aml-pr-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.aml-pr-card-head h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.aml-icon-chip {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.aml-icon-chip.blue {
    background: var(--pr-blue-bg);
    color: var(--pr-blue);
}

.aml-icon-chip.green {
    background: var(--pr-green-bg);
    color: var(--pr-green);
}

.aml-icon-chip.amber {
    background: var(--pr-amber-bg);
    color: var(--pr-amber);
}

/* Review Frequency Chart */
.aml-freq-chart {
    position: relative;
    height: 160px;
    margin: 10px 8px 30px 30px;
    border-left: 1px solid var(--aml-grid);
    border-bottom: 1px solid var(--aml-grid);
    flex: 1;
}

.aml-freq-y {
    position: absolute;
    left: -24px;
    transform: translateY(-50%);
    font-size: 11.5px;
    color: var(--aml-muted);
}

.aml-freq-y::after {
    content: "";
    position: absolute;
    right: -12px;
    top: 50%;
    width: 5px;
    border-top: 1px solid var(--aml-grid);
}

.aml-freq-x {
    position: absolute;
    bottom: -22px;
    transform: translateX(-50%);
    font-size: 11.5px;
    color: var(--aml-muted);
    white-space: nowrap;
}

.aml-freq-v {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px dashed var(--aml-grid);
}

.aml-freq-h {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--aml-grid);
}

/* Schedule Status Donut */
.aml-pr-donut-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 20px;
}

.aml-pr-donut {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    -webkit-mask: radial-gradient(circle, transparent 46px, #000 47px);
    mask: radial-gradient(circle, transparent 46px, #000 47px);
}

.aml-pr-status-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.aml-pr-status-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: var(--aml-bg);
    border: 1px solid var(--aml-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.aml-pr-status-item .aml-pr-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.aml-pr-dot.green {
    background: var(--pr-green);
}

.aml-pr-dot.gray {
    background: #a2a9b6;
}

.aml-pr-status-item b {
    display: block;
    font-size: 14px;
    margin: 0;
}

.aml-pr-status-item span {
    font-size: 12.5px;
    color: var(--aml-muted);
}

/* Review Urgency List */
.aml-pr-urgency-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.aml-pr-urgency-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--aml-bg);
    border: 1px solid var(--aml-border);
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
}

.aml-pr-urgency-row .aml-pr-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0;
}

.aml-pr-dot.red {
    background: var(--pr-red);
}

.aml-pr-dot.amber {
    background: var(--pr-amber);
}

.aml-pr-urgency-row .aml-pr-count {
    margin-left: auto;
    font-size: 19px;
    font-weight: 800;
}

.aml-pr-count.red {
    color: var(--pr-red);
}

.aml-pr-count.amber {
    color: var(--pr-amber);
}

.aml-pr-count.green {
    color: var(--pr-green);
}

/* Responsive */
@media (max-width: 1100px) {
    .aml-pr-cards {
        grid-template-columns: 1fr;
    }

    .aml-pr-card {
        height: auto;
        min-height: 320px;
    }
}

/* =============================================
   ENHANCED & SCALABLE MODAL SYSTEM
   ============================================= */
.kyro-modal-dialog {
    max-width: 560px;
    width: 92vw;
    margin: 1.75rem auto;
}

.kyro-modal-content {
    background: var(--aml-card, #ffffff);
    color: var(--aml-text, #1f2937);
    border: 1px solid var(--aml-border, #e5e7eb);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: kyroModalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes kyroModalScale {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.kyro-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--aml-border, #e5e7eb);
    background: var(--aml-card, #ffffff);
}

.kyro-modal-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 141, 40, 0.12);
    color: #FF8D28;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kyro-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--aml-text, #111827);
}

.kyro-modal-subtitle {
    font-size: 12.5px;
    color: var(--aml-muted, #6b7280);
    margin: 2px 0 0 0;
}

.kyro-modal-body {
    padding: 24px;
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

.kyro-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: var(--aml-bg, #f9fafb);
    border-top: 1px solid var(--aml-border, #e5e7eb);
}

.kyro-form-group {
    margin-bottom: 20px;
}

.kyro-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--aml-text, #374151);
    margin-bottom: 8px;
}

.kyro-form-select,
.kyro-form-input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid var(--aml-border, #d1d5db);
    background: var(--aml-card, #ffffff);
    color: var(--aml-text, #111827);
    outline: none;
    transition: all 0.2s ease;
}

.kyro-form-select:focus,
.kyro-form-input:focus {
    border-color: #FF8D28;
    box-shadow: 0 0 0 3.5px rgba(255, 141, 40, 0.18);
}

/* =============================================
   RESPONSIVE NAVBAR & HEADER STYLING
   ============================================= */
.kyro-header-left {
    margin-left: 40px;
}

.kyro-header-nav-wrap {
    margin-left: 40px;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.kyro-header-nav-wrap::-webkit-scrollbar {
    display: none;
    /* Chrome & Safari */
}

@media (min-width: 1400px) {
    .kyro-header-left {
        margin-left: 60px;
    }

    .kyro-header-nav-wrap {
        margin-left: 60px;
    }
}

@media (max-width: 992px) {
    .kyro-header-left {
        margin-left: 8px !important;
    }

    .kyro-header-nav-wrap {
        margin-left: 8px !important;
    }
}

@media (max-width: 992px) {
    .kyro-header-left {
        margin-left: 8px !important;
    }

    .kyro-header-nav-wrap {
        margin-left: 8px !important;
    }
}

@media (max-width: 768px) {
    .kyro-navbar .px-4 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .kyro-header-nav-wrap a {
        font-size: 13px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* =============================================
   MOBILE HAMBURGER DRAWER & DASHBOARD GRID
   ============================================= */
.kyro-mobile-drawer {
    position: fixed;
    top: 0;
    left: -285px;
    width: 280px;
    height: 100vh;
    background: var(--aml-card, #ffffff);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    z-index: 10050;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.kyro-mobile-drawer.open {
    left: 0;
}

.kyro-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.kyro-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Dashboard Responsiveness */
.kyro-dashboard-container {
    padding: 24px 32px 32px;
    max-width: 1440px;
    margin: 0 auto;
}

.kyro-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 992px) {
    .kyro-desktop-nav-row {
        display: none !important;
    }

    .kyro-dashboard-container {
        padding: 16px 16px 24px !important;
        margin: 0 auto !important;
        max-width: 100% !important;
    }

    .kyro-dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0 !important;
        margin: 0 auto !important;
    }
}

/* Review Case Volume & Card Screen Ratio Responsiveness */
@media (max-width: 768px) {

    /* Cards ratio and padding scaling */
    .aml-card,
    section.aml-card {
        padding: 18px 16px !important;
        border-radius: 14px !important;
        height: auto !important;
        min-height: auto !important;
    }

    .aml-card h2 {
        font-size: 16px !important;
    }

    .aml-subtitle {
        font-size: 12px !important;
        margin-bottom: 12px !important;
    }

    /* Review Case Volume Chart Mobile Scalability */
    .aml-chart {
        height: 180px !important;
        margin-left: 28px !important;
    }

    .aml-gridline span {
        left: -28px !important;
        font-size: 10px !important;
    }

    .aml-bars {
        gap: 10px !important;
        justify-content: space-around !important;
    }

    .aml-bar {
        width: 18px !important;
        border-radius: 9px !important;
    }

    .aml-x-label {
        font-size: 10px !important;
    }

    /* Donut card mobile ratio */
    .aml-donut-wrap {
        padding: 16px 0 !important;
    }

    .aml-donut {
        width: 170px !important;
        height: 170px !important;
    }
}

@media (max-width: 480px) {
    .aml-chart {
        height: 160px !important;
        margin-left: 24px !important;
    }

    .aml-gridline span {
        left: -24px !important;
        font-size: 9px !important;
    }

    .aml-bars {
        gap: 4px !important;
    }

    .aml-bar {
        width: 14px !important;
        border-radius: 7px !important;
    }

    .aml-x-label {
        font-size: 9px !important;
    }

    .aml-donut {
        width: 150px !important;
        height: 150px !important;
    }
}

/* =============================================
   FIGMA ACTION CARDS MOBILE RESPONSIVENESS
   ============================================= */
.take-action-wrapper {
    padding: 0 32px;
    max-width: 1440px;
    margin: 0 auto 40px;
}

.figma-action-card, .figma-action-card-dark {
    box-shadow: 0px 12px 24px -4px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(124, 143, 172, 0.28) !important;
    border-radius: 16px !important;
    background-color: var(--aml-card, #ffffff) !important;
    padding: 24px 20px !important;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

.figma-action-card-dark {
    background-color: #111827 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0px 12px 24px -4px rgba(0, 0, 0, 0.4) !important;
}

.figma-action-card:hover, .figma-action-card-dark:hover {
    transform: translateY(-4px);
    box-shadow: 0px 16px 32px -4px rgba(255, 141, 40, 0.25) !important;
}

@media (max-width: 992px) {
    .take-action-wrapper {
        padding: 0 16px !important;
    }

    .figma-action-card, .figma-action-card-dark {
        min-height: 170px !important;
        padding: 20px 16px !important;
        margin-bottom: 16px !important;
    }

    .figma-action-card h3, .figma-action-card-dark h3 {
        font-size: 1.1rem !important;
        margin-bottom: 8px !important;
    }

    .figma-action-card p, .figma-action-card-dark p {
        font-size: 0.875rem !important;
        margin-bottom: 16px !important;
    }
}

@media (max-width: 768px) {
    .take-action-back-btn {
        position: static !important;
        margin: 20px auto 30px !important;
        display: block !important;
        text-align: center !important;
        width: fit-content !important;
    }
}

@media (max-width: 576px) {
    .take-action-wrapper {
        padding: 0 12px !important;
    }

    .figma-action-card, .figma-action-card-dark {
        min-height: 150px !important;
        padding: 18px 14px !important;
    }
}

/* =============================================
   STRICT MOBILE VIEWPORT FIT & OVERFLOW PREVENTION
   ============================================= */
html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.kyro-navbar {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
}

.main-layout-container, #mainContent {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 992px) {
    .kyro-header-left, .kyro-header-nav-wrap {
        margin-left: 0 !important;
    }
    
    .kyro-navbar .px-4 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ========================================
   RESPONSIVE DESIGN FOR MAIN LAYOUT
   ======================================== */

/* Tablets and below (992px) */
@media (max-width: 992px) {
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .main-content {
        padding: 1.25rem !important;
    }
}

/* Mobile devices (768px and below) */
@media (max-width: 768px) {
    /* Sidebar - Stack or hide */
    .sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
        z-index: 1050;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    /* Main content full width on mobile */
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 1rem !important;
    }
    
    /* Container */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Navbar */
    .navbar {
        padding: 0.75rem 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.125rem !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: 0.875rem !important;
    }
    
    /* Tables - Horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.8125rem !important;
    }
    
    table th,
    table td {
        padding: 0.5rem !important;
        white-space: nowrap;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.875rem !important;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Small mobile devices (576px and below) */
@media (max-width: 576px) {
    .main-content {
        padding: 0.75rem !important;
    }
    
    .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Typography */
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
    }
    
    h4 {
        font-size: 1rem !important;
    }
    
    h5 {
        font-size: 0.9375rem !important;
    }
    
    h6 {
        font-size: 0.875rem !important;
    }
    
    /* Forms */
    .form-control {
        font-size: 0.9375rem !important;
        padding: 0.625rem !important;
    }
    
    .form-label {
        font-size: 0.8125rem !important;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .modal-content {
        border-radius: 10px !important;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.875rem !important;
    }
}

/* Utility classes for responsive visibility */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Touch-friendly tap targets on mobile */
@media (max-width: 768px) {
    a,
    button,
    .btn,
    .clickable {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ========================================
   GLOBAL MOBILE OPTIMIZATIONS
   ======================================== */

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

html, body {
    max-width: 100vw !important;
}

/* Better text rendering on mobile */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Fix iOS input zoom */
@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Navbar Mobile Fixes */
@media (max-width: 768px) {
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-brand img {
        height: 32px !important;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 6px;
        font-size: 0.9375rem !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 140, 66, 0.1);
    }
}

/* Sidebar Mobile - Slide in/out */
@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 280px;
        background: white;
        z-index: 1040;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0 !important;
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
}

/* Container Mobile Adjustments */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    .row {
        margin-left: -0.375rem !important;
        margin-right: -0.375rem !important;
    }
    
    .row > * {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
}

/* Card Mobile Optimizations */
@media (max-width: 768px) {
    .card {
        border-radius: 10px !important;
        margin-bottom: 0.875rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }
    
    .card-header {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-footer {
        padding: 0.75rem 1rem !important;
    }
}

/* Table Mobile - Full responsive */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    
    table {
        font-size: 0.8125rem !important;
        min-width: 600px;
    }
    
    table thead th {
        font-size: 0.75rem !important;
        padding: 0.625rem 0.5rem !important;
        white-space: nowrap;
    }
    
    table tbody td {
        padding: 0.625rem 0.5rem !important;
        white-space: nowrap;
    }
    
    /* DataTables mobile adjustments */
    .dataTables_wrapper {
        font-size: 0.8125rem !important;
    }
    
    .dataTables_filter input,
    .dataTables_length select {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
}

/* Button Mobile Optimizations */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
        border-radius: 6px !important;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        min-height: 38px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.9375rem !important;
        min-height: 48px;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 6px !important;
        margin-bottom: 0.5rem;
    }
}

/* Form Mobile Optimizations */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 0.75rem !important;
        border-radius: 6px !important;
        min-height: 44px;
    }
    
    .form-label {
        font-size: 0.875rem !important;
        font-weight: 500;
        margin-bottom: 0.375rem;
    }
    
    .input-group {
        flex-wrap: nowrap;
    }
    
    textarea.form-control {
        min-height: 100px;
    }
}

/* Modal Mobile Optimizations */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100%;
        margin: 0;
    }
    
    .modal-content {
        border-radius: 12px !important;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-header {
        padding: 1rem !important;
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
    }
    
    .modal-body {
        padding: 1rem !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 0.875rem 1rem !important;
        border-bottom-left-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
    }
    
    .modal-title {
        font-size: 1.125rem !important;
    }
}

/* Dropdown Mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        font-size: 0.875rem !important;
        min-width: 200px;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Badge Mobile */
@media (max-width: 768px) {
    .badge {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.625rem !important;
    }
}

/* Alert Mobile */
@media (max-width: 768px) {
    .alert {
        font-size: 0.875rem !important;
        padding: 0.875rem !important;
        border-radius: 8px !important;
    }
}

/* Pagination Mobile */
@media (max-width: 768px) {
    .pagination {
        font-size: 0.875rem !important;
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem !important;
        min-width: 38px;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Breadcrumb Mobile */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .breadcrumb-item {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Tabs Mobile */
@media (max-width: 768px) {
    .nav-tabs {
        border-bottom: 2px solid #e5e7eb;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.875rem !important;
        padding: 0.625rem 1rem !important;
        white-space: nowrap;
        border: none;
        border-bottom: 2px solid transparent;
    }
    
    .nav-tabs .nav-link.active {
        border-bottom-color: #FF8C42;
        background: transparent;
    }
}

/* Spinner/Loading Mobile */
@media (max-width: 768px) {
    .spinner-border {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    .spinner-border-sm {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}

/* Toast Mobile */
@media (max-width: 768px) {
    .toast-container {
        bottom: 1rem !important;
        right: 1rem !important;
        left: 1rem !important;
    }
    
    .toast {
        font-size: 0.875rem !important;
        max-width: 100% !important;
    }
}

/* Spacing Utilities Mobile Override */
@media (max-width: 768px) {
    .mb-5, .my-5 {
        margin-bottom: 2rem !important;
    }
    
    .mt-5, .my-5 {
        margin-top: 2rem !important;
    }
    
    .pb-5, .py-5 {
        padding-bottom: 2rem !important;
    }
    
    .pt-5, .py-5 {
        padding-top: 2rem !important;
    }
}

/* Utility: Hide on mobile */
.d-mobile-none {
    display: block;
}

@media (max-width: 768px) {
    .d-mobile-none {
        display: none !important;
    }
}

/* Utility: Show only on mobile */
.d-mobile-block {
    display: none;
}

@media (max-width: 768px) {
    .d-mobile-block {
        display: block !important;
    }
}

/* Modal scroll prevention */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1055 !important;
}

.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1050 !important;
}

.modal-dialog {
    position: relative !important;
    z-index: 1060 !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}
/* End of file */
