/* ===================================
   DIGITAL CX & INSIGHTS PLATFORM - DEMO
   Royal Brunei Airlines
   =================================== */

:root {
    /* Royal Brunei Airlines Official Brand Colors */
    --primary-color: #ffe600;      /* Royal Gold - Signature Yellow */
    --primary-dark: #563c18;       /* Royal Bronze - Rich Brown */
    --primary-light: #ffd54f;      /* Light Gold */
    --secondary-color: #271100;    /* Royal Dark - Deep Brown */
    --accent-gold: #ffbd1b;        /* Royal Gold Accent */

    /* Royal Brunei Accent Colors */
    --rb-peach: #fbc6b8;          /* Peach Coral */
    --rb-sage: #c1d2c7;           /* Sage Green */
    --rb-sky: #a8d4ed;            /* Sky Blue */
    --rb-khaki: #a27d6a;          /* Khaki Tan */

    /* Functional Colors */
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --info: #2196F3;

    /* Neutral Colors */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ===================================
   HEADER
   =================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    display: inline-block;
    margin-right: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: var(--primary-dark);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 230, 0, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    position: relative;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100);
}

.btn-icon i {
    font-size: 1.25rem;
    color: var(--gray-600);
}

.notification-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    background: var(--gray-50);
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background: var(--gray-100);
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-profile span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===================================
   SIDEBAR
   =================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 90;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
    font-weight: 500;
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
}

.nav-item:hover {
    background: rgba(255, 230, 0, 0.1);
    color: var(--primary-dark);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-gold));
    color: var(--primary-dark);
    border-right: 4px solid var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 230, 0, 0.3);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-600);
}

.sidebar-footer p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.75rem;
    color: var(--gray-900);
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

/* ===================================
   BUTTONS & INPUTS
   =================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-gold));
    color: var(--primary-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 230, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-gold), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 230, 0, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-sm.btn-danger:hover {
    background: #d32f2f;
}

.btn-action {
    padding: 0.375rem 0.875rem;
    background: var(--primary-color);
    color: var(--primary-dark);
    border: 1px solid var(--primary-dark);
    border-radius: 4px;
    font-size: 0.813rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--primary-dark);
    color: var(--primary-color);
    transform: scale(1.05);
}

.select-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    min-width: 300px;
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.2);
}

/* ===================================
   KPI CARDS
   =================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.kpi-icon.blue { background: linear-gradient(135deg, var(--rb-sky), #7eb8e0); }
.kpi-icon.green { background: linear-gradient(135deg, var(--rb-sage), #a0bba8); }
.kpi-icon.orange { background: linear-gradient(135deg, var(--primary-color), var(--accent-gold)); }
.kpi-icon.purple { background: linear-gradient(135deg, var(--rb-khaki), #8b6654); }

.kpi-content {
    flex: 1;
}

.kpi-content h3 {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.kpi-change {
    font-size: 0.813rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-change.positive {
    color: var(--success);
}

.kpi-change.negative {
    color: var(--danger);
}

/* ===================================
   CHARTS
   =================================== */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.chart-card.wide {
    grid-column: 1 / -1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray-500);
    border-radius: 4px;
}

.btn-icon-small:hover {
    background: var(--gray-100);
}

/* ===================================
   TABLES
   =================================== */

.table-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-count {
    background: var(--danger);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-danger {
    background: #FFEBEE;
    color: var(--danger);
}

.badge-warning {
    background: #FFF3E0;
    color: var(--warning);
}

.badge-success {
    background: #E8F5E9;
    color: var(--success);
}

.badge-info {
    background: #E3F2FD;
    color: var(--info);
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ===================================
   SESSION RECORDINGS
   =================================== */

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.session-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.session-thumbnail {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
}

.session-duration {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.813rem;
    font-weight: 600;
}

.session-flag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.session-flag.critical {
    background: var(--danger);
    color: white;
}

.session-flag.warning {
    background: var(--warning);
    color: white;
}

.session-info {
    padding: 1.25rem;
}

.session-info h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.813rem;
    color: var(--gray-600);
}

.session-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.session-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.625rem;
    background: var(--gray-100);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
}

.tag.success {
    background: #E8F5E9;
    color: var(--success);
}

.tag.danger {
    background: #FFEBEE;
    color: var(--danger);
}

/* ===================================
   FEEDBACK
   =================================== */

.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feedback-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-300);
}

.feedback-card.positive {
    border-left-color: var(--success);
}

.feedback-card.negative {
    border-left-color: var(--danger);
}

.feedback-card.neutral {
    border-left-color: var(--gray-400);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.feedback-sentiment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.feedback-sentiment.positive { color: var(--success); }
.feedback-sentiment.negative { color: var(--danger); }
.feedback-sentiment.neutral { color: var(--gray-600); }

.feedback-time {
    font-size: 0.813rem;
    color: var(--gray-500);
}

.feedback-text {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.feedback-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.813rem;
    color: var(--gray-600);
}

.feedback-score {
    background: var(--secondary-color);
    color: var(--gray-900);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.813rem;
}

.feedback-actions {
    display: flex;
    gap: 0.75rem;
}

/* ===================================
   AI INSIGHTS
   =================================== */

.ai-section {
    display: grid;
    gap: 1.5rem;
}

.ai-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ai-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.ai-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.prediction-grid {
    display: grid;
    gap: 1.5rem;
}

.prediction-item h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--gray-800);
}

.risk-meter {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.risk-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--danger));
    transition: width 0.3s;
}

.prediction-item p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.genai-response {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.genai-response p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.genai-response ul {
    margin: 1rem 0 1rem 1.5rem;
}

.genai-response li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.sentiment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.sentiment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.sentiment-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.sentiment-item.positive .sentiment-dot { background: var(--success); }
.sentiment-item.neutral .sentiment-dot { background: var(--gray-400); }
.sentiment-item.negative .sentiment-dot { background: var(--danger); }

/* ===================================
   WORKFLOWS
   =================================== */

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.workflow-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gray-300);
}

.workflow-card.active {
    border-top-color: var(--success);
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.workflow-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.workflow-body p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.workflow-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.813rem;
    color: var(--gray-600);
}

/* ===================================
   CUSTOMER 360
   =================================== */

.customer-profile {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
}

.profile-sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.profile-sidebar h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.customer-id {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.customer-score {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.score-label {
    display: block;
    font-size: 0.813rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
}

.score-value.warning {
    color: var(--warning);
}

.customer-tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.profile-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.journey-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
    border-left: 3px solid var(--gray-200);
}

.timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.timeline-item.critical { border-left-color: var(--danger); }
.timeline-item.positive { border-left-color: var(--success); }
.timeline-item.negative { border-left-color: var(--danger); }
.timeline-item.neutral { border-left-color: var(--gray-300); }

.timeline-marker {
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--gray-400);
}

.timeline-item.critical .timeline-marker { border-color: var(--danger); }
.timeline-item.positive .timeline-marker { border-color: var(--success); }
.timeline-item.negative .timeline-marker { border-color: var(--danger); }

.timeline-content h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.timeline-time {
    font-size: 0.813rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.timeline-actions {
    display: flex;
    gap: 0.75rem;
}

.feedback-score-inline {
    display: inline-block;
    background: var(--secondary-color);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.813rem;
}

.customer-insights {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.customer-insights h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.insight-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
}

.insight-item i {
    font-size: 1.25rem;
}

.insight-item p {
    color: var(--gray-700);
    line-height: 1.6;
}

.text-info { color: var(--info); }

/* ===================================
   ANALYTICS SECTION
   =================================== */

.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.insight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.insight-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
}

.insight-icon {
    font-size: 2rem;
    color: var(--secondary-color);
}

.insight-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--gray-800);
}

.insight-content p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.insight-confidence {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #E8F5E9;
    color: var(--success);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===================================
   MODAL
   =================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

/* ===================================
   SESSION PLAYER
   =================================== */

.player-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.player-screen {
    background: var(--gray-900);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-mockup {
    width: 100%;
}

.mockup-browser {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.browser-bar {
    background: var(--gray-200);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-400);
}

.browser-dots span:nth-child(1) { background: #FF5F56; }
.browser-dots span:nth-child(2) { background: #FFBD2E; }
.browser-dots span:nth-child(3) { background: #27C93F; }

.browser-url {
    flex: 1;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.813rem;
    color: var(--gray-600);
}

.browser-content {
    padding: 2rem;
    min-height: 400px;
}

.browser-content h2 {
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.demo-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.875rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.demo-payment-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.demo-payment-btn:hover {
    background: var(--primary-dark);
}

.rage-click-indicator {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #FFEBEE;
    color: var(--danger);
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    animation: pulse 1s infinite;
}

.rage-click-indicator.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-dark);
    background: var(--primary-color);
    color: var(--primary-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 230, 0, 0.3);
}

.control-btn:hover {
    background: var(--primary-dark);
    color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(86, 60, 24, 0.4);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: left 0.1s;
}

.time-display {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-family: 'Courier New', monospace;
}

.session-events {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    max-height: 500px;
    overflow-y: auto;
}

.session-events h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.event-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 4px;
    font-size: 0.813rem;
}

.event-item.critical {
    background: #FFEBEE;
}

.event-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--gray-700);
    min-width: 45px;
}

.event-desc {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1200px) {
    .player-container {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

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

    .charts-grid,
    .sessions-grid,
    .feedback-grid,
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .customer-profile {
        grid-template-columns: 1fr;
    }

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