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

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

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    color: #c9d2dc;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: row;
}

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

/* ==================== SIDEBAR ==================== */
.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;
}

.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;
}

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

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #8c99a8;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

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

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

/* 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-family: 'Inter', sans-serif;
    font-size: 14px;
}

.nav-item.section-header {
    background: rgba(43,139,230,0.2);
    border-left: 4px solid #2b8be6;
    color: #2b8be6;
    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;
}

.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 CONTAINER ==================== */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ==================== HEADER ==================== */
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

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

@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);
    }
}

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

.header-button {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #c9d2dc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.header-icon-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c9d2dc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.header-icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* ==================== CONTENT AREA ==================== */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.assessment-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease;
}

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

.assessment-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.assessment-subtitle {
    font-size: 16px;
    color: #8c99a8;
}

/* ==================== ROLE SELECTOR ==================== */
.role-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50px;
    color: #c9d2dc;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-color: transparent;
    color: white;
}

/* ==================== QUESTIONS CONTAINER ==================== */
.questions-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.question-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #2b8be6;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    animation: slideInLeft 0.6s ease;
}

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

.question-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

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

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #f2f5f9;
}

.score-display {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 60px;
    text-align: center;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-label-min {
    font-size: 12px;
    color: #8c99a8;
    min-width: 70px;
}

.slider-label-max {
    font-size: 12px;
    color: #8c99a8;
    min-width: 100px;
    text-align: right;
}

input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(43,139,230,0.5);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(43,139,230,0.8);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(43,139,230,0.5);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(43,139,230,0.8);
}

.explanation-label {
    font-size: 13px;
    font-weight: 500;
    color: #8c99a8;
    margin-top: 8px;
}

.explanation-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #c9d2dc;
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    resize: vertical;
    transition: all 0.3s ease;
}

.explanation-textarea:focus {
    outline: none;
    border-color: #2b8be6;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(43,139,230,0.3);
}

/* ==================== RESULTS SECTION ==================== */
.results-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    margin-top: 32px;
    animation: fadeIn 0.6s ease;
    display: none;
}

.results-section.show {
    display: block;
}

.results-header {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
}

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

.dashboard-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==================== DASHBOARD VIEW ==================== */
.dashboard-view {
    display: none;
    animation: fadeIn 0.6s ease;
}

.dashboard-view.active {
    display: block;
}

.assessment-view {
    display: block;
}

.assessment-view.hidden {
    display: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.dashboard-role-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.dashboard-role-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-role-title {
    font-size: 1.3rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-align: center;
}

.dashboard-role-score {
    text-align: center;
    font-size: 14px;
    color: #8c99a8;
    margin-bottom: 15px;
}

.dashboard-role-card .progress-bar {
    margin-bottom: 20px;
}

.dashboard-role-card .chart-wrapper {
    height: 350px;
}

.dashboard-role-card .spider-3d-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.summary-card-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8c99a8;
    margin-bottom: 10px;
}

.summary-card-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.component-header {
    text-align: center;
    margin-bottom: 30px;
}

.component-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.component-subtitle {
    font-size: 1.1rem;
    color: #8c99a8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #8c99a8;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

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

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 24px;
    height: 675px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.spider-3d-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
    background: #131820;
    position: relative;
}

.spider-3d-tooltip {
    position: fixed;
    z-index: 1000;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(21,27,36,0.95), rgba(32,42,57,0.95));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(43,139,230,0.4);
    border-radius: 10px;
    color: #c9d2dc;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -100%);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-width: 240px;
}

.spider-3d-tooltip.visible {
    opacity: 1;
}

.spider-3d-tooltip-label {
    color: #8c99a8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.spider-3d-tooltip-value {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spider-3d-container {
    cursor: crosshair;
}

.spider-3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ==================== CHART VIEW TOGGLE ==================== */
.chart-view-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 12px;
}

.chart-view-toggle .toggle-btn {
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #8c99a8;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.chart-view-toggle .toggle-btn:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.chart-view-toggle .toggle-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.chart-view-toggle .toggle-btn.active {
    background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
    border-color: rgba(84,104,242,0.5);
    color: #c9d2dc;
    box-shadow: 0 0 12px rgba(84,104,242,0.2);
}

.chart-view-toggle .toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: #cdd4df;
}

.spider-2d-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==================== BUTTONS ==================== */
.button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    color: white;
    box-shadow: 0 10px 30px rgba(43,139,230,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(43,139,230,0.5);
}

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #c9d2dc;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==================== PRIA CHATBOT ==================== */
.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;
}

.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.3s ease;
}

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

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

.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;
}

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

.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);
}

.message.bot .message-content.ai-styled .ai-response {
    line-height: 1.7;
    color: #ffffff;
    font-size: 13px;
}

.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;
}

.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%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ==================== ISSUES TRACKER ==================== */
.issues-tracker {
    position: fixed;
    right: 0;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    z-index: 998;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 20px;
    gap: 16px;
}

.issues-tracker.open {
    display: flex;
    transform: translateX(0);
}

.issues-header {
    font-size: 16px;
    font-weight: 700;
    color: #f2f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.issues-close {
    background: none;
    border: none;
    color: #c9d2dc;
    cursor: pointer;
    font-size: 20px;
}

.issues-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.issue-item {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #f59e0b;
}

.issue-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.issue-item-desc {
    font-size: 12px;
    color: #f59e0b;
    opacity: 0.8;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    .sidebar.collapsed {
        left: 0;
        width: 280px;
    }

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

    .chatbot-window {
        width: 90%;
        right: 0;
    }

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

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5468f2, #435af1);
}

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #8c99a8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 32px;
}

/* ─── AI Recommendation Modal ─── */
.recommend-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
    z-index: 2000; align-items: center; justify-content: center;
}

.recommend-modal {
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    border: 1px solid rgba(84,104,242,0.3);
    border-radius: 20px; padding: 0; width: 700px; max-width: 95vw;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 40px rgba(84,104,242,0.15);
    overflow: hidden;
}
.recommend-modal-header {
    background: linear-gradient(135deg, #5468f2, #4255d9);
    padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
    color: white;
}
.recommend-modal-header h3 { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.recommend-modal-header h3 .material-icons { font-size: 24px; }
.recommend-modal-close {
    background: rgba(255,255,255,0.15); border: none; color: white; cursor: pointer;
    padding: 8px; border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.recommend-modal-close:hover { background: rgba(255,255,255,0.25); }
.recommend-modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.recommend-input-row {
    display: flex; gap: 12px; align-items: center; margin-bottom: 20px;
}
.recommend-input {
    flex: 1; padding: 14px 20px;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(84,104,242,0.3);
    border-radius: 14px; font-size: 15px; color: #f2f5f9;
    outline: none; transition: all 0.3s; font-family: 'Inter', sans-serif;
}
.recommend-input:focus { border-color: #5468f2; background: rgba(84,104,242,0.1); box-shadow: 0 0 0 4px rgba(84,104,242,0.15); }
.recommend-input::placeholder { color: #838f9f; }
.recommend-ai-btn {
    width: 50px; height: 50px; border-radius: 50%;
    border: 2px solid rgba(84,104,242,0.5);
    background: linear-gradient(135deg, rgba(84,104,242,0.3), rgba(66,85,217,0.4));
    color: #b8c1fa; cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.3s;
}
.recommend-ai-btn:hover {
    background: linear-gradient(135deg, rgba(84,104,242,0.5), rgba(66,85,217,0.6));
    border-color: #8c9bf7; color: white; transform: scale(1.08);
    box-shadow: 0 0 20px rgba(84,104,242,0.5);
}
.recommend-ai-btn.loading { pointer-events: none; animation: sparkle-pulse 1.2s ease-in-out infinite; }
.recommend-ai-btn .material-icons { font-size: 24px; }
.recommend-results {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; padding: 24px; min-height: 120px; color: #c9d2dc;
    line-height: 1.7; font-size: 14px;
    max-height: 55vh; overflow-y: auto; scroll-behavior: smooth;
}

.recommend-apply-btn.loading::after {
    content: ''; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: rgba(201,209,220,.14); border-radius: 50%; animation: spin 0.8s linear infinite; margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.recommend-chip {
    padding: 8px 16px; background: rgba(84,104,242,0.1);
    border: 1px solid rgba(84,104,242,0.25); border-radius: 20px;
    font-size: 12px; cursor: pointer; transition: all 0.3s; color: #8c9bf7;
}
.recommend-chip:hover { background: rgba(84,104,242,0.25); border-color: #5468f2; color: #b8c1fa; }
@media print {
    body * { visibility: hidden; }
    #recommendResults, #recommendResults * { visibility: visible; }
    #recommendResults {
        position: absolute; left: 0; top: 0; width: 100%;
        background: #fff !important; color: #141c28 !important;
        border: none !important; padding: 30px !important;
        font-size: 13px !important; line-height: 1.6 !important;
    }
    #recommendResults h2 { color: #0c21a6 !important; border-bottom: 2px solid #5468f2 !important; }
    #recommendResults h3 { color: #1431ed !important; }
    #recommendResults p, #recommendResults li { color: #1c2430 !important; }
    #recommendResults strong { color: #000 !important; }
    #recommendResults ul li::marker { color: #4255d9 !important; }
    .recommend-print-btn, .recommend-apply-btn, .recommend-btn-row { display: none !important; }
}

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

.issues-tracker-form.hidden {
    display: none;
}

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

.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;
}
