/* competitiveanalysis.html — page-specific styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
            min-height: 100vh;
            color: #c9d2dc;
            line-height: 1.6;
        }

        .app-container {
            display: flex;
            min-height: 100vh;
        }

        /* Sidebar with Modern Design */
        .sidebar {
            width: 280px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            border-right: 1px solid rgba(255, 255, 255, 0.1);
            color: white;
            padding: 24px 0;
            box-shadow: 2px 0 25px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
            overflow-y: auto;
            flex-shrink: 0;
        }

        .sidebar.collapsed {
            width: 80px;
        }

        /* Ensure main content adjusts when sidebar is collapsed */
        .app-container .sidebar.collapsed ~ .main-content .content {
            max-width: calc(100vw - 80px);
            transition: max-width 0.3s ease;
        }

        .sidebar-header {
            padding: 0 24px 24px;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            margin-bottom: 24px;
        }

        .header-buttons {
            margin-top: 16px;
        }

        .header-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: rgba(43,139,230,0.1);
            border: 1px solid rgba(43,139,230,0.3);
            border-radius: 8px;
            color: #2b8be6;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            justify-content: center;
        }

        .header-btn:hover {
            background: rgba(43,139,230,0.2);
            border-color: rgba(43,139,230,0.5);
            transform: translateY(-1px);
        }

        .header-btn .material-icons {
            font-size: 16px;
        }

        .knowledge-base-btn {
            background: rgba(84,104,242,0.1);
            border-color: rgba(84,104,242,0.3);
            color: #5468f2;
        }

        .knowledge-base-btn:hover {
            background: rgba(84,104,242,0.2);
            border-color: rgba(84,104,242,0.5);
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 20px;
            font-weight: 600;
            color: white;
            background: linear-gradient(135deg, #ff6b00, #ff9933);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .logo img {
            height: 32px;
        }

        .logo .material-icons {
            margin-right: 12px;
            font-size: 28px;
        }

        /* Navigation Items with Modern Styling */
        .nav-item {
            display: flex;
            align-items: center;
            padding: 12px 24px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            background: none;
            color: white;
            width: 100%;
            text-align: left;
            position: relative;
            border-radius: 0 25px 25px 0;
            margin: 4px 0;
            font-size: 14px;
            font-family: inherit;
        }

        .nav-item:hover {
            background: rgba(255,255,255,0.1);
            transform: translateX(5px);
        }

        .nav-item.section-header {
            background: rgba(43,139,230,0.2);
            border-left: 4px solid #2b8be6;
            color: #cdd4df;
            font-weight: 600;
            margin: 8px 0 4px 0;
            box-shadow: 0 4px 15px rgba(43,139,230,0.2);
        }

        .nav-item.active-page {
            background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
            border-left: 4px solid #5468f2;
            color: white;
            font-weight: 500;
            box-shadow: 0 4px 20px rgba(84,104,242,0.3);
        }

        .nav-item .material-icons {
            margin-right: 12px;
            font-size: 20px;
            transition: all 0.3s ease;
            flex-shrink: 0;
            color: inherit;
        }

        .sidebar.collapsed .nav-text {
            display: none;
        }

        .sidebar.collapsed .expand-icon {
            display: none;
        }

        .nav-text {
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
        }

        .expand-icon {
            margin-left: auto;
            transition: transform 0.3s ease;
            font-size: 18px;
            flex-shrink: 0;
        }

        .nav-item.section-header.expanded .expand-icon {
            transform: rotate(90deg);
        }

        .nav-item.section-header.expanded {
            background: #26303f;
        }

        /* Sub-navigation with Modern Design */
        .nav-subitems {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background: #26303f;
            backdrop-filter: blur(10px);
        }

        .nav-subitems.expanded {
            max-height: 1000px;
        }

        .sidebar.collapsed .nav-subitems {
            display: none;
        }

        .nav-subitems .nav-item {
            background: transparent;
            padding-left: 52px;
            font-weight: 400;
            margin: 2px 0;
        }

        .nav-subitems .nav-item:hover {
            background: rgba(255,255,255,0.1);
            transform: translateX(8px);
        }

        .nav-subitems .nav-item.active-page {
            background: rgba(84,104,242,0.2);
            border-left: 3px solid #5468f2;
        }

        /* Main Content with Modern Styling */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: rgba(255,255,255,0.02);
            min-width: 0; /* Allow flex item to shrink below content size */
            overflow: hidden; /* Prevent horizontal overflow */
        }

        .header {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 20px 32px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header-left {
            display: flex;
            align-items: center;
        }

        .header-title {
            font-size: 28px;
            font-weight: 700;
            margin-left: 20px;
            background: linear-gradient(135deg, #ff6b00, #ff9933);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .header-icon-btn {
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px; padding: 10px; color: #8c99a8; cursor: pointer;
            transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
        }
        .header-icon-btn:hover { background: rgba(43,139,230,0.2); color: #2b8be6; border-color: #2b8be6; }

        .user-badge {
            display: flex; align-items: center; gap: 10px;
            padding: 8px 16px 8px 8px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 25px; cursor: pointer;
            transition: all 0.3s ease;
        }
        .user-badge:hover { background: rgba(43,139,230,0.15); }
        .user-avatar {
            width: 34px; height: 34px; border-radius: 50%;
            background: linear-gradient(135deg,#2b8be6,#5468f2);
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 700; color: white;
        }
        .user-name { font-size: 13px; font-weight: 500; color: #c9d2dc; }

        .status-indicator {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 20px;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
            backdrop-filter: blur(10px);
            border: 1px solid rgba(16, 185, 129, 0.3);
            border-radius: 25px;
            font-size: 14px;
            color: #10b981;
            font-weight: 500;
        }

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

        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
            }
        }

        /* ===== CONTENT AREA ===== */
        .content {
            padding: 0 32px 32px;
            flex: 1;
            overflow-y: auto;
            position: relative;
        }

        /* ===== GRID LAYOUT ===== */
        .grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 24px; }
        .grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; margin-bottom: 24px; }
        .grid-3-equal { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-bottom: 24px; }

        .card {
            background: rgba(255,255,255,0.05);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 20px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.2);
            overflow: hidden;
            transition: all 0.3s ease;
            animation: fadeInUp 0.5s ease forwards;
        }
        .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 40px rgba(0,0,0,0.3);
            border-color: rgba(255,255,255,0.15);
        }

        .card-header {
            padding: 32px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            background: linear-gradient(135deg, rgba(43,139,230,0.1), rgba(84,104,242,0.1));
        }

        .card-header-bar {
            padding: 16px 20px 12px;
            display: flex; align-items: center; justify-content: space-between;
        }

        .card-label {
            font-size: 15px; font-weight: 700;
            letter-spacing: 0.3px;
        }
        .card-label.orange { color: #ff6b00; }
        .card-label.blue { color: #2b8be6; }
        .card-label.green { color: #10b981; }
        .card-label.red { color: #ef4444; }
        .card-label.purple { color: #5468f2; }
        .card-label.cyan { color: #186dc2; }
        .card-dropdown {
            display: flex; align-items: center; gap: 4px;
            font-size: 13px; font-weight: 600; color: #8c99a8; cursor: pointer;
            transition: color 0.2s;
        }
        .card-dropdown:hover { color: #c9d2dc; }
        .card-dropdown .material-icons { font-size: 18px; }

        .card-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 12px;
            color: #f2f5f9;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .card-subtitle {
            color: #8c99a8;
            font-size: 16px;
            font-weight: 400;
        }

        .card-body { padding: 0 20px 20px; }

        .card-content {
            padding: 32px;
        }

        .card-actions {
            display: flex;
            gap: 12px;
        }

        /* Modern Button Styling */
        .btn {
            padding: 16px 32px;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            font-family: 'Inter', sans-serif;
            text-decoration: none;
        }

        .btn-primary {
            background: linear-gradient(135deg, #ff6b00, #ff9933);
            color: white;
            box-shadow: 0 4px 15px rgba(255,107,0,0.3);
        }

        .btn-secondary {
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            color: #8c99a8; cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-success {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }

        .btn-outlined {
            background: transparent;
            color: #ff6b00;
            border: 2px solid #ff6b00;
        }

        .btn:hover:not(:disabled) {
            transform: translateY(-2px);
        }

        .btn-success:hover:not(:disabled) {
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
        }

        .btn-primary:hover:not(:disabled) {
            box-shadow: 0 8px 25px rgba(255,107,0,0.4);
        }

        .btn-secondary:hover {
            background: rgba(43,139,230,0.2);
            border-color: #2b8be6; color: #2b8be6;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* Form Styling with Dark Theme */
        .form-section {
            margin-bottom: 40px;
        }

        .section-title {
            font-size: 20px;
            font-weight: 600;
            background: linear-gradient(135deg, #ff6b00, #ff9933);
            background-clip: text;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            padding-bottom: 8px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }

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

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        .form-label {
            font-size: 14px;
            font-weight: 500;
            color: #c9d2dc;
            margin-bottom: 4px;
        }

        .form-input, .form-textarea, .form-select {
            padding: 16px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            font-size: 16px;
            font-family: 'Inter', sans-serif;
            transition: all 0.3s ease;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(10px);
            color: #f2f5f9;
        }

        .form-input:focus, .form-textarea:focus, .form-select:focus {
            outline: none;
            border-color: #2b8be6;
            box-shadow: 0 0 0 3px rgba(43,139,230,0.1);
            background: rgba(0, 0, 0, 0.4);
        }

        .form-input::placeholder, .form-textarea::placeholder {
            color: #838f9f;
        }

        .form-textarea {
            min-height: 120px;
            resize: vertical;
        }

        .competitors-section {
            margin-top: 32px;
        }

        .competitor-card {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 20px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .competitor-card:hover {
            border-color: #2b8be6;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .competitor-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .competitor-title {
            font-size: 18px;
            font-weight: 500;
            color: #2b8be6;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .remove-competitor {
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50%;
            width: 36px;
            height: 36px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .remove-competitor:hover {
            background: #dc2626;
            transform: scale(1.1);
        }

        .swot-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-top: 20px;
        }

        .swot-item {
            background: rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            border-radius: 8px;
            padding: 16px;
            border-left: 4px solid;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .swot-strengths {
            border-left-color: #10b981;
        }

        .swot-weaknesses {
            border-left-color: #ef4444;
        }

        .swot-opportunities {
            border-left-color: #2b8be6;
        }

        .swot-threats {
            border-left-color: #f59e0b;
        }

        .swot-label {
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .add-competitor-btn {
            width: 100%;
            padding: 16px;
            border: 2px dashed #2b8be6;
            background: transparent;
            border-radius: 12px;
            color: #2b8be6;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

        .add-competitor-btn:hover {
            background: rgba(43,139,230,0.1);
        }

        .preview-section {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            padding: 24px;
            margin-top: 32px;
            border: 2px solid rgba(255, 255, 255, 0.1);
        }

        .preview-title {
            font-size: 24px;
            font-weight: 600;
            color: #2b8be6;
            margin-bottom: 20px;
            text-align: center;
        }

        .preview-competitor {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .preview-competitor-name {
            font-size: 20px;
            font-weight: 500;
            color: #2b8be6;
            margin-bottom: 16px;
        }

        .preview-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px;
        }

        .preview-field {
            background: rgba(0, 0, 0, 0.2);
            padding: 12px;
            border-radius: 6px;
        }

        .preview-field-label {
            font-size: 12px;
            font-weight: 500;
            color: #8c99a8;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }

        .preview-field-value {
            font-size: 14px;
            color: #c9d2dc;
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal.show {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 32px;
            max-width: 90vw;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            transform: translateY(-20px);
            transition: all 0.3s ease;
            color: #c9d2dc;
        }

        .modal.show .modal-content {
            transform: translateY(0);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }

        .modal-title {
            font-size: 24px;
            font-weight: 500;
            color: #2b8be6;
        }

        .close-modal {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: #8c99a8;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .close-modal:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #c9d2dc;
        }

        .dashboard-modal-content {
            width: min(1200px, 94vw);
        }

        .dashboard-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px;
        }

        .dashboard-kpis {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 14px;
            margin-bottom: 18px;
        }

        .dashboard-kpi {
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            padding: 12px;
        }

        .dashboard-kpi-label {
            font-size: 12px;
            color: #8c99a8;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .dashboard-kpi-value {
            font-size: 22px;
            color: #c9d2dc;
            font-weight: 700;
            margin-top: 2px;
        }

        .dashboard-grid {
            display: grid;
            grid-template-columns: 1.4fr 1fr;
            gap: 16px;
        }

        .dashboard-panel {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            padding: 14px;
        }

        .dashboard-panel-title {
            font-size: 14px;
            color: #8c99a8;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            margin-bottom: 10px;
        }

        .dashboard-bar-chart {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .dashboard-bar-row {
            display: grid;
            grid-template-columns: 200px 1fr 46px;
            align-items: center;
            gap: 10px;
        }

        .dashboard-bar-label {
            font-size: 13px;
            color: #cdd4df;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .dashboard-bar-track {
            height: 11px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.08);
            overflow: hidden;
        }

        .dashboard-bar-fill {
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #2b8be6, #5468f2);
            transition: width 0.35s ease;
        }

        .dashboard-donut {
            width: 220px;
            height: 220px;
            border-radius: 50%;
            margin: 0 auto 10px;
            position: relative;
            background: conic-gradient(#2b8be6 0deg, #5468f2 360deg);
        }

        .dashboard-donut::after {
            content: "";
            position: absolute;
            inset: 40px;
            border-radius: 50%;
            background: rgba(16,21,27,0.96);
            border: 1px solid rgba(255,255,255,0.08);
        }

        .dashboard-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
            margin-top: 8px;
        }

        .dashboard-legend-item {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: #cdd4df;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.03);
        }

        .dashboard-swatch {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .dashboard-card-grid {
            margin-top: 14px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .dashboard-competitor-card {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 10px;
        }

        .dashboard-competitor-name {
            font-weight: 600;
            color: #c9d2dc;
            margin-bottom: 6px;
        }

        .dashboard-tag-row {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .dashboard-tag {
            font-size: 11px;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(43,139,230,0.16);
            border: 1px solid rgba(43,139,230,0.35);
            color: #c5def8;
        }

        .hidden {
            display: none !important;
        }

        .fade-in {
            animation: fadeIn 0.5s ease;
        }

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

        /* ============================================================
           AI INTEGRATION — banner, query bar, narrative, KPI, callout
           ============================================================ */
        @keyframes aiPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
        @keyframes aiShimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        @keyframes aiFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
        @keyframes aiFadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes aiRingPulse {
            0% { box-shadow: 0 0 0 0 rgba(84,104,242,0.45); }
            70% { box-shadow: 0 0 0 8px rgba(84,104,242,0); }
            100% { box-shadow: 0 0 0 0 rgba(84,104,242,0); }
        }

        /* AI Executive Banner */
        .ai-banner {
            position: relative; display: flex; align-items: flex-start; gap: 14px;
            padding: 14px 18px;
            background: linear-gradient(135deg, rgba(84,104,242,0.14), rgba(43,139,230,0.12), rgba(43,136,229,0.08));
            background-size: 300% 300%;
            animation: aiShimmer 12s ease infinite;
            border: 1px solid rgba(84,104,242,0.35);
            border-radius: 16px; margin-bottom: 18px;
            overflow: hidden;
        }
        .ai-banner::before {
            content: ''; position: absolute; inset: 0;
            background: radial-gradient(circle at 20% 0%, rgba(84,104,242,0.18), transparent 60%);
            pointer-events: none;
        }
        .ai-banner-icon {
            width: 40px; height: 40px; border-radius: 12px;
            background: linear-gradient(135deg, #5468f2, #2b8be6);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; box-shadow: 0 4px 14px rgba(84,104,242,0.4);
            position: relative; z-index: 1;
        }
        .ai-banner-body { flex: 1; position: relative; z-index: 1; }
        .ai-banner-title {
            font-size: 12px; font-weight: 700; color: #b8c1fa;
            text-transform: uppercase; letter-spacing: 0.5px;
            display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
        }
        .ai-banner-title .material-icons { font-size: 14px; }
        .ai-banner-text {
            font-size: 13px; color: #c9d2dc; line-height: 1.55;
        }
        .ai-banner-text strong { color: #ff9933; font-weight: 600; }
        .ai-banner-text em { font-style: normal; color: #83b9f0; font-weight: 500; }
        .ai-banner-cta {
            display: flex; gap: 6px; flex-shrink: 0; position: relative; z-index: 1;
        }
        .ai-banner-cta button {
            padding: 7px 12px; border-radius: 10px;
            background: rgba(255,255,255,0.08); border: 1px solid rgba(84,104,242,0.35);
            color: #b8c1fa; font-size: 11px; font-weight: 600;
            cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
            font-family: inherit; transition: all 0.2s ease;
        }
        .ai-banner-cta button:hover {
            background: rgba(84,104,242,0.22); color: #fff; transform: translateY(-1px);
        }
        .ai-banner-cta button .material-icons { font-size: 14px; }

        /* AI Query Bar */
        .ai-query-bar {
            display: flex; align-items: center; gap: 10px;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(84,104,242,0.25);
            border-radius: 14px; padding: 10px 14px; margin-bottom: 14px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .ai-query-bar:focus-within {
            border-color: rgba(84,104,242,0.6);
            box-shadow: 0 0 0 3px rgba(84,104,242,0.12);
        }
        .ai-query-icon {
            width: 32px; height: 32px; border-radius: 10px;
            background: linear-gradient(135deg, #5468f2, #2b8be6);
            display: flex; align-items: center; justify-content: center;
            color: #fff; flex-shrink: 0;
        }
        .ai-query-icon .material-icons { font-size: 18px; }
        .ai-query-input {
            flex: 1; background: transparent; border: none; outline: none;
            color: #f2f5f9; font-family: inherit; font-size: 13px;
            min-width: 100px;
        }
        .ai-query-input::placeholder { color: #8c99a8; }
        .ai-query-chips { display: flex; gap: 6px; flex-wrap: wrap; }
        .ai-query-chip {
            padding: 5px 10px; border-radius: 999px;
            background: rgba(84,104,242,0.12); border: 1px solid rgba(84,104,242,0.25);
            color: #b8c1fa; font-size: 10px; font-weight: 500;
            cursor: pointer; transition: all 0.2s ease;
            display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
        }
        .ai-query-chip:hover { background: rgba(84,104,242,0.22); }
        .ai-query-chip .material-icons { font-size: 12px; }
        .ai-query-send {
            width: 34px; height: 34px; border-radius: 10px;
            background: linear-gradient(135deg, #5468f2, #2b8be6);
            border: none; color: #fff; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: all 0.2s ease; flex-shrink: 0;
        }
        .ai-query-send:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(84,104,242,0.4); }

        /* AI Narrative Ticker */
        .ai-narrative-strip {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 14px;
            background: linear-gradient(90deg, rgba(84,104,242,0.08), rgba(43,139,230,0.08));
            border: 1px solid rgba(84,104,242,0.25);
            border-radius: 12px; margin-bottom: 14px;
            font-size: 12.5px; color: #c9d2dc;
        }
        .ai-narrative-strip strong { color: #ff9933; }
        .ai-narrative-strip em { color: #83b9f0; font-style: normal; font-weight: 500; }
        .ai-narrative-icon {
            width: 30px; height: 30px; border-radius: 10px;
            background: linear-gradient(135deg, rgba(84,104,242,0.25), rgba(43,139,230,0.18));
            border: 1px solid rgba(84,104,242,0.3);
            display: flex; align-items: center; justify-content: center;
            color: #b8c1fa; flex-shrink: 0;
        }
        .ai-narrative-icon .material-icons { font-size: 14px; animation: aiFloat 2.5s ease infinite; }
        .ai-narrative-body { flex: 1; transition: opacity 0.4s ease; }
        .ai-narrative-dots { display: inline-flex; gap: 3px; }
        .ai-narrative-dot {
            width: 6px; height: 6px; border-radius: 50%;
            background: rgba(84,104,242,0.3); transition: background .3s ease;
        }
        .ai-narrative-dot.active { background: #5468f2; }

        /* AI Confidence Chip + Explain Button (reusable on cards) */
        .ai-conf-chip {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 3px 8px; border-radius: 999px;
            background: rgba(84,104,242,0.15);
            border: 1px solid rgba(84,104,242,0.3);
            color: #b8c1fa; font-size: 10.5px; font-weight: 600;
        }
        .ai-conf-chip .material-icons { font-size: 11px; }
        .ai-explain-btn {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 6px 12px; border-radius: 10px;
            background: rgba(84,104,242,0.12);
            border: 1px solid rgba(84,104,242,0.35);
            color: #b8c1fa; font-size: 11.5px; font-weight: 600; cursor: pointer;
            transition: all 0.2s ease; font-family: inherit;
        }
        .ai-explain-btn:hover {
            background: rgba(84,104,242,0.25); color: #fff;
            transform: translateY(-1px);
        }
        .ai-explain-btn .material-icons { font-size: 15px; animation: aiFloat 2.8s ease infinite; }
        .ai-explain-btn.active { background: linear-gradient(135deg, #5468f2, #2b8be6); color: #fff; }

        /* AI Callout (expandable in-card) */
        .ai-callout {
            max-height: 0; overflow: hidden;
            transition: max-height 0.35s ease, margin-top 0.3s ease;
            margin-top: 0;
        }
        .ai-callout.open { max-height: 1200px; margin-top: 12px; }
        .ai-callout-inner {
            background: rgba(84,104,242,0.06);
            border: 1px solid rgba(84,104,242,0.28);
            border-radius: 14px; padding: 14px 16px;
            animation: aiFadeUp 0.3s ease;
        }
        .ai-callout-head {
            display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
            padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .ai-callout-title {
            flex: 1; font-weight: 700; color: #f2f5f9; font-size: 13px;
            display: flex; align-items: center; gap: 6px;
        }
        .ai-callout-title .material-icons { font-size: 14px; }
        .ai-callout-close {
            width: 24px; height: 24px; border-radius: 7px;
            background: transparent; border: none; cursor: pointer;
            color: #8c99a8; display: flex; align-items: center; justify-content: center;
        }
        .ai-callout-close:hover { background: rgba(255,255,255,0.06); color: #f2f5f9; }
        .ai-callout-body {
            color: #c9d2dc; font-size: 12.5px; line-height: 1.55;
        }
        .ai-callout-body strong { color: #ff9933; }
        .ai-callout-body em { color: #83b9f0; font-style: normal; font-weight: 500; }
        .ai-callout-body > div + div { margin-top: 6px; }
        .ai-callout-actions {
            display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
        }
        .ai-action-chip {
            padding: 5px 10px; border-radius: 999px;
            background: rgba(84,104,242,0.15); border: 1px solid rgba(84,104,242,0.3);
            color: #b8c1fa; font-size: 11px; font-weight: 500; cursor: pointer;
            transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 4px;
            font-family: inherit;
        }
        .ai-action-chip:hover { background: rgba(84,104,242,0.25); color: #fff; }
        .ai-action-chip .material-icons { font-size: 12px; }
        .ai-reasoning {
            margin-top: 10px; background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 10px; padding: 10px 12px;
            font-size: 11.5px; color: #c9d2dc; line-height: 1.55;
        }
        .ai-reasoning-step {
            padding: 4px 0; border-bottom: 1px dashed rgba(255,255,255,0.05);
        }
        .ai-reasoning-step:last-child { border-bottom: none; }

        /* AI KPI strip — 4 clickable sparkle cards */
        .ai-kpi-strip {
            display: grid; grid-template-columns: repeat(4, 1fr);
            gap: 12px; margin-bottom: 18px;
        }
        .ai-kpi-card {
            position: relative; padding: 12px 14px; padding-right: 36px;
            background: linear-gradient(135deg, rgba(84,104,242,0.05), rgba(43,139,230,0.04));
            border: 1px solid rgba(84,104,242,0.2);
            border-radius: 14px;
            transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        }
        .ai-kpi-card:hover {
            transform: translateY(-2px);
            border-color: rgba(84,104,242,0.5);
            box-shadow: 0 6px 20px rgba(84,104,242,0.18);
        }
        .ai-kpi-label {
            display: flex; align-items: center; gap: 5px;
            font-size: 10px; color: #b8c1fa; font-weight: 600;
            text-transform: uppercase; letter-spacing: 0.4px;
        }
        .ai-kpi-label .material-icons { font-size: 12px; color: #b8c1fa; }
        .ai-kpi-value {
            font-size: 22px; font-weight: 700; color: #f2f5f9; margin-top: 4px;
            line-height: 1.2;
        }
        .ai-kpi-value.red { color: #f87171; }
        .ai-kpi-value.amber { color: #fbbf24; }
        .ai-kpi-value.green { color: #10b981; }
        .ai-kpi-value.purple { color: #b8c1fa; }
        .ai-kpi-delta {
            margin-top: 3px; display: flex; align-items: center; gap: 3px;
            font-size: 11px; color: #8c99a8;
        }
        .ai-kpi-delta .material-icons { font-size: 13px; }
        .ai-kpi-delta.red { color: #f87171; }
        .ai-kpi-delta.amber { color: #fbbf24; }
        .ai-kpi-delta.green { color: #10b981; }
        .ai-kpi-ai-mark {
            position: absolute; top: 8px; right: 8px;
            width: 24px; height: 24px; border-radius: 50%;
            background: rgba(84,104,242,0.18);
            border: 1px solid rgba(84,104,242,0.4);
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 0;
            transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
        }
        .ai-kpi-ai-mark:hover {
            transform: scale(1.18);
            background: linear-gradient(135deg, rgba(84,104,242,0.55), rgba(43,139,230,0.55));
            border-color: rgba(84,104,242,0.9);
            box-shadow: 0 0 0 4px rgba(84,104,242,0.18), 0 4px 12px rgba(84,104,242,0.35);
        }
        .ai-kpi-ai-mark:focus-visible { outline: 2px solid #5468f2; outline-offset: 2px; }
        .ai-kpi-ai-mark:hover .material-icons { color: #fff; }
        .ai-kpi-ai-mark .material-icons {
            font-size: 13px; color: #b8c1fa; pointer-events: none;
            animation: aiFloat 2.5s ease infinite;
        }

        /* AI sparkle on existing dashboard KPIs (.dashboard-kpi) */
        .dashboard-kpi { position: relative; }
        .dashboard-kpi .ai-kpi-ai-mark {
            top: 6px; right: 6px; width: 22px; height: 22px;
        }

        /* Card title row pattern — for embedding AI chip + button next to title */
        .card-title-row {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
        }
        .card-title-row .left { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }

        /* Keep AI buttons readable inside the gradient-text .section-title */
        .section-title .ai-explain-btn,
        .section-title .ai-conf-chip {
            -webkit-background-clip: border-box;
            background-clip: border-box;
            -webkit-text-fill-color: currentColor;
            font-weight: 600;
        }
        .section-title .ai-explain-btn .material-icons { -webkit-text-fill-color: currentColor; }

        @media (max-width: 1100px) {
            .ai-kpi-strip { grid-template-columns: repeat(2, 1fr); }
            .ai-banner { flex-direction: column; }
        }

        /* Modern Chatbot Styles */
        .chatbot-container {
            position: fixed;
            bottom: 32px;
            right: 32px;
            z-index: 1000;
        }

        .chatbot-trigger {
            width: 72px;
            height: 72px;
            background: linear-gradient(135deg, #2b8be6, #5468f2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 8px 25px rgba(43,139,230,0.4);
            transition: all 0.3s ease;
            border: none;
            color: white;
            animation: chatbotPulse 3s infinite;
        }

        .chatbot-trigger:hover {
            transform: scale(1.1);
            box-shadow: 0 12px 35px rgba(43,139,230,0.5);
        }

        .chatbot-trigger .material-icons {
            font-size: 32px;
        }

        @keyframes chatbotPulse {
            0% {
                box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 0 rgba(43,139,230,0.7);
            }
            70% {
                box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 15px rgba(43,139,230,0);
            }
            100% {
                box-shadow: 0 8px 25px rgba(43,139,230,0.4), 0 0 0 0 rgba(43,139,230,0);
            }
        }

        .chatbot-window {
            position: fixed;
            bottom: 122px;
            right: 32px;
            width: 380px;
            height: calc(100vh - 210px);
            max-height: calc(100vh - 210px);
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(25px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
            display: none;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(20px);
            opacity: 0;
            transition: all 0.4s ease;
        }

        .chatbot-window.active {
            display: flex;
            transform: translateY(0);
            opacity: 1;
        }

        .chatbot-header {
            background: linear-gradient(135deg, #2b8be6, #5468f2);
            color: white;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .chatbot-header-info {
            display: flex;
            align-items: center;
        }

		.chatbot-avatar {
			width: 48px;
			height: 48px;
			border-radius: 50%;
			background-image: url('../pria-avatar.png');
			background-size: cover;
			background-position: center;
			background-repeat: no-repeat;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-right: 16px;
			box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
		}
        .chatbot-info {
            flex: 1;
        }

        .chatbot-name {
            font-weight: 600;
            font-size: 18px;
            margin-bottom: 4px;
        }

        .chatbot-status {
            font-size: 14px;
            opacity: 0.9;
            display: flex;
            align-items: center;
        }

        .status-indicator-dot {
            width: 8px;
            height: 8px;
            background: #10b981;
            border-radius: 50%;
            margin-right: 8px;
            animation: pulse 2s infinite;
        }

        .chatbot-close {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.2s;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chatbot-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .quick-actions {
            display: flex;
            gap: 8px;
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .quick-action {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #8c99a8;
        }

        .quick-action:hover {
            background: rgba(43,139,230,0.2);
            border-color: #2b8be6;
            color: #2b8be6;
        }

        .chatbot-messages {
            flex: 1;
            padding: 24px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.1);
        }

        .message {
            margin-bottom: 20px;
            animation: messageSlideIn 0.4s ease;
        }

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

        .message.bot {
            display: flex;
            align-items: flex-start;
        }

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

        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2b8be6, #5468f2);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            font-weight: bold;
            margin-right: 12px;
            flex-shrink: 0;
        }

        .message-content {
            max-width: 85%;
            padding: 16px 20px;
            border-radius: 18px;
            font-size: 14px;
            line-height: 1.5;
        }

        .message.bot .message-content {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #f2f5f9;
            border-bottom-left-radius: 6px;
        }

        .message.user .message-content {
            background: linear-gradient(135deg, #2b8be6, #5468f2);
            color: white;
            border-bottom-right-radius: 6px;
        }

        .chatbot-input-area {
            padding: 20px;
            background: rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        .chatbot-input {
            width: 100%;
            padding: 16px 20px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 25px;
            font-size: 14px;
            color: #f2f5f9;
            outline: none;
            transition: all 0.3s ease;
            font-family: 'Inter', sans-serif;
        }

        .chatbot-input:focus {
            border-color: #2b8be6;
            background: rgba(255, 255, 255, 0.1);
        }

        .chatbot-input-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chatbot-input-row .chatbot-input {
            flex: 1;
            width: auto;
            min-width: 0;
        }

        #chatbot-ai-btn {
            flex-shrink: 0;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            background: linear-gradient(135deg, rgba(43,139,230,0.25), rgba(84,104,242,0.35));
            border: 2px solid rgba(84,104,242,0.45);
            color: #b8c1fa;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        #chatbot-ai-btn:hover {
            background: linear-gradient(135deg, rgba(43,139,230,0.4), rgba(84,104,242,0.5));
            border-color: #5468f2;
            color: #b8c1fa;
            transform: scale(1.08);
            box-shadow: 0 0 16px rgba(84,104,242,0.4);
        }
        #chatbot-ai-btn.loading {
            pointer-events: none;
            animation: sparkle-pulse 1.2s ease-in-out infinite;
        }
        @keyframes sparkle-pulse {
            0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(84,104,242,0.3); }
            50% { opacity: 0.6; box-shadow: 0 0 20px rgba(84,104,242,0.6); }
        }

        /* AI-powered chatbot response (outcome-results style inside chatbot) */
        .message.bot .message-content.ai-styled {
            background: rgba(11,14,19,0.85);
            border: 1px solid rgba(43,139,230,0.25);
            max-width: 92%;
            padding: 20px;
        }
        .message.bot .message-content.ai-styled .ai-response {
            line-height: 1.7;
            color: #ffffff;
            font-size: 13px;
        }
        .message.bot .message-content.ai-styled .ai-response h2 {
            font-weight: 700;
            color: #2b8be6;
            margin: 16px 0 8px 0;
            border-bottom: 1px solid rgba(43,139,230,0.3);
            padding-bottom: 6px;
            font-size: 15px;
        }
        .message.bot .message-content.ai-styled .ai-response h3 {
            color: #2b8be6;
            font-weight: 600;
            margin: 14px 0 6px 0;
            font-size: 14px;
        }
        .message.bot .message-content.ai-styled .ai-response p {
            margin-bottom: 10px;
            color: #c9d2dc;
        }
        .message.bot .message-content.ai-styled .ai-response ul,
        .message.bot .message-content.ai-styled .ai-response ol {
            padding-left: 20px;
            margin: 8px 0;
        }
        .message.bot .message-content.ai-styled .ai-response li {
            margin-bottom: 6px;
            color: #c9d2dc;
        }
        .message.bot .message-content.ai-styled .ai-response ul li {
            list-style-type: disc;
        }
        .message.bot .message-content.ai-styled .ai-response ul li::marker {
            color: #2b8be6;
        }
        .message.bot .message-content.ai-styled .ai-response ol li {
            list-style-type: decimal;
        }
        .message.bot .message-content.ai-styled .claude-stream-text {
            white-space: pre-wrap;
            word-break: break-word;
            color: #c9d2dc;
        }

        .chatbot-input::placeholder {
            color: #8c99a8;
        }

        .typing-indicator {
            display: flex;
            align-items: center;
            padding: 16px 20px;
            margin-bottom: 20px;
        }

        .typing-dots {
            display: flex;
            gap: 6px;
            margin-left: 12px;
        }

        .typing-dot {
            width: 8px;
            height: 8px;
            background: #8c99a8;
            border-radius: 50%;
            animation: typingDot 1.4s infinite;
        }

        .typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typingDot {
            0%, 60%, 100% {
                transform: translateY(0);
                opacity: 0.4;
            }
            30% {
                transform: translateY(-12px);
                opacity: 1;
            }
        }

        /* Responsive Design */
        @media (max-width: 768px) {
            .sidebar {
                width: 80px;
                background: #26303f;
            }

            .sidebar .nav-text {
                display: none;
            }

            .header-title {
                font-size: 20px;
            }

            .content {
                padding: 20px;
                max-width: calc(100vw - 80px); /* Account for collapsed sidebar on mobile */
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .swot-grid {
                grid-template-columns: 1fr;
            }

            .preview-grid {
                grid-template-columns: 1fr;
            }

            .dashboard-controls,
            .dashboard-grid,
            .dashboard-kpis,
            .dashboard-card-grid {
                grid-template-columns: 1fr;
            }

            .dashboard-bar-row {
                grid-template-columns: 1fr;
                gap: 6px;
            }

            .card-header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }

            .card-actions {
                flex-direction: column;
                width: 100%;
            }

            .chatbot-window {
                width: 320px;
                height: calc(100vh - 190px);
                max-height: calc(100vh - 190px);
            }

            .chatbot-container {
                bottom: 20px;
                right: 20px;
            }

            .issues-tracker-window {
                width: 320px;
                max-height: 85vh;
                min-height: 400px;
                right: 50px;
            }

            .issues-tracker-container {
                top: 50%;
                right: 0;
            }
        }

        @media print {
            .sidebar, .header, .chatbot-container, .card-actions, .btn, .form-section {
                display: none !important;
            }

            body {
                background: white !important;
            }

            .main-content {
                margin: 0;
                padding: 0;
            }

            .card {
                box-shadow: none !important;
                border: 1px solid #000 !important;
                background: white !important;
                color: #000 !important;
            }

            .card-header {
                background: white !important;
                color: #000 !important;
                border-bottom: 2px solid #000 !important;
            }
        }

        /* Notification Styles */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
            z-index: 1001;
            transform: translateX(100%);
            transition: all 0.3s ease;
        }

        .notification.show {
            transform: translateX(0);
        }

        /* Issues Tracker Styles */
        .issues-tracker-container {
            position: fixed;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            z-index: 1001;
        }

        .issues-tracker-trigger {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            border-radius: 50% 0 0 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: -4px 0 15px rgba(245, 158, 11, 0.3);
            transition: all 0.3s ease;
            border: none;
            color: white;
            animation: issuesPulse 4s infinite;
        }

        .issues-tracker-trigger:hover {
            transform: translateY(-50%) translateX(-5px);
            box-shadow: -8px 0 25px rgba(245, 158, 11, 0.4);
        }

        .issues-tracker-trigger .material-icons {
            font-size: 24px;
        }

        @keyframes issuesPulse {
            0% {
                box-shadow: -4px 0 15px rgba(245, 158, 11, 0.3), 0 0 0 0 rgba(245, 158, 11, 0.7);
            }
            70% {
                box-shadow: -4px 0 15px rgba(245, 158, 11, 0.3), 0 0 0 10px rgba(245, 158, 11, 0);
            }
            100% {
                box-shadow: -4px 0 15px rgba(245, 158, 11, 0.3), 0 0 0 0 rgba(245, 158, 11, 0);
            }
        }

        .issues-tracker-window {
            position: absolute;
            top: 50%;
            right: 60px;
            transform: translateY(-50%);
            width: 400px;
            max-height: 90vh;
            min-height: 500px;
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(25px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px 0 0 20px;
            box-shadow: -20px 0 50px rgba(0, 0, 0, 0.3);
            display: none;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(-50%) translateX(20px);
            opacity: 0;
            transition: all 0.4s ease;
        }

        .issues-tracker-window.active {
            display: flex;
            transform: translateY(-50%) translateX(0);
            opacity: 1;
        }

        .issues-tracker-header {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .issues-tracker-header-info {
            display: flex;
            align-items: center;
        }

        .issues-tracker-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 16px;
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
        }

        .issues-tracker-info {
            flex: 1;
        }

        .issues-tracker-name {
            font-weight: 600;
            font-size: 16px;
            margin-bottom: 4px;
        }

        .issues-tracker-status {
            font-size: 12px;
            opacity: 0.9;
        }

        .issues-tracker-close {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.2s;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .issues-tracker-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .issues-tracker-form {
            flex: 1;
            padding: 24px;
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.1);
            max-height: calc(90vh - 80px);
        }

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

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #f2f5f9;
            font-size: 14px;
        }

        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 12px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            font-size: 14px;
            color: #f2f5f9;
            outline: none;
            transition: all 0.3s ease;
            font-family: 'Inter', sans-serif;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            border-color: #f59e0b;
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
        }

        .form-input::placeholder,
        .form-textarea::placeholder {
            color: #8c99a8;
        }

        .form-textarea {
            min-height: 100px;
            resize: vertical;
        }

        .form-submit {
            width: 100%;
            padding: 16px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 16px;
            margin-top: 20px;
        }

        .form-submit:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
        }

        .form-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .form-success {
            text-align: center;
            padding: 40px 20px;
        }

        .form-success .material-icons {
            font-size: 64px;
            color: #10b981;
            margin-bottom: 20px;
        }

        .form-success h3 {
            font-size: 24px;
            font-weight: 600;
            margin-bottom: 16px;
            color: #f2f5f9;
        }

        .form-success p {
            color: #8c99a8;
            line-height: 1.6;
        }

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

        /* Responsive adjustments for issues tracker */
        @media (max-width: 768px) {
            .issues-tracker-window {
                width: 320px;
                min-height: 400px;
            }

            .issues-tracker-container {
                top: 60%;
            }
        }

        .sample-data-btn {
            background: linear-gradient(135deg, #4caf50, #66bb6a);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
        }

        .sample-data-btn:hover {
            background: linear-gradient(135deg, #45a049, #5bb974);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
        }

        .sample-data-btn .material-icons {
            font-size: 1.1rem;
        }

        .ai-research-btn {
            background: linear-gradient(135deg, #4255d9, #1f74c9);
            color: white;
            border: none;
            padding: 12px 14px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(66,85,217,0.35);
        }

        .ai-research-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 22px rgba(31,116,201,0.45);
            filter: brightness(1.06);
        }

        .ai-research-btn .material-icons {
            font-size: 1.25rem;
        }

        .competitor-ai-modal-content {
            width: min(720px, 92vw);
            max-height: 88vh;
        }

        .competitor-ai-modal-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: #c9d2dc;
            line-height: 1.35;
            max-width: calc(100% - 48px);
        }

        .competitor-ai-field-label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #8c99a8;
            margin-bottom: 8px;
            margin-top: 4px;
        }

        .competitor-ai-prompt {
            width: 100%;
            min-height: 100px;
            padding: 14px 16px;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            font-family: inherit;
            font-size: 14px;
            color: #f2f5f9;
            resize: vertical;
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        .competitor-ai-prompt:focus {
            outline: none;
            border-color: #5468f2;
            box-shadow: 0 0 0 3px rgba(84,104,242,0.15);
        }

        .competitor-ai-prompt::placeholder {
            color: #838f9f;
        }

        .competitor-ai-results {
            width: 100%;
            min-height: 220px;
            padding: 14px 16px;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 12px;
            font-family: inherit;
            font-size: 14px;
            color: #f2f5f9;
            resize: vertical;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .competitor-ai-results:focus {
            outline: none;
            border-color: #2b8be6;
        }

        .competitor-ai-results.error-text {
            color: #f87171;
        }

        .competitor-ai-context-section {
            margin-top: 6px;
        }

        .competitor-ai-context-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 16px;
            padding: 12px 14px;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
        }

        @media (max-width: 520px) {
            .competitor-ai-context-grid {
                grid-template-columns: 1fr;
            }
        }

        .competitor-ai-context-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 13px;
            color: #cdd4df;
            line-height: 1.35;
            cursor: pointer;
            user-select: none;
        }

        .competitor-ai-context-item input {
            margin-top: 2px;
            flex-shrink: 0;
            accent-color: #5468f2;
        }

        .competitor-ai-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 16px 0 20px;
        }

        .btn-competitor-ai-go {
            padding: 12px 24px;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, #5468f2, #2b8be6);
            color: white;
            box-shadow: 0 4px 14px rgba(84,104,242,0.35);
            transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
        }

        .btn-competitor-ai-go:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(43,139,230,0.4);
        }

        .btn-competitor-ai-go:disabled {
            opacity: 0.55;
            cursor: not-allowed;
            transform: none;
        }

        .competitor-ai-toast {
            position: fixed;
            bottom: 100px;
            left: 50%;
            transform: translateX(-50%);
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 0.83rem;
            z-index: 2000;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        }

        /* ===== ANIMATION ===== */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .grid-3 .card:nth-child(2), .grid-3-equal .card:nth-child(2) { animation-delay: 0.1s; }
        .grid-3 .card:nth-child(3), .grid-3-equal .card:nth-child(3) { animation-delay: 0.2s; }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 1400px) {
            .grid-3, .grid-3-equal { grid-template-columns: repeat(2,1fr); }
        }
        @media (max-width: 1000px) {
            .grid-3, .grid-3-equal, .grid-2 { grid-template-columns: 1fr; }
            .sidebar { display: none; }
        }
