/* Dashboard Components */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.interactive-card {
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--tricolor-gradient);
    opacity: 0;
    transition: var(--transition);
}

.interactive-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.interactive-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    background: var(--tricolor-gradient);
}

.interactive-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.interactive-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Chat UI */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    border-radius: 16px;
    overflow: hidden;
}

.chat-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
}

.chat-header h3 { margin: 0; }

.chat-header .select-input {
    width: auto;
    min-width: 180px;
    background-color: var(--bg-card);
}

.chat-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 85%;
    animation: slideUp 0.3s ease;
}

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

.message.ai { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.ai .avatar {
    background: var(--primary-color);
    color: white;
}

.message.user .avatar {
    background-color: var(--border-color);
    color: var(--text-main);
}

.msg-bubble {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.message.ai .msg-bubble {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
    border-left: 3px solid var(--saffron);
}

.message.user .msg-bubble {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border-top-right-radius: 4px;
}

.chat-input-area {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background-color: var(--secondary-color);
}

.voice-btn {
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.voice-btn:hover {
    background-color: var(--saffron-light);
    border-color: var(--saffron);
    transform: scale(1.05);
}

.voice-btn.recording {
    background-color: var(--error);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Map UI */
.map-controls {
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.google-map-placeholder {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
}

.empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.loader-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--bg-body), 0.8);
    backdrop-filter: blur(4px);
}

.loader {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-right: 4px solid var(--saffron);
    border-bottom: 4px solid var(--green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.mock-map-bg {
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-overlay {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--primary-color);
}

.map-overlay svg { margin-bottom: 1rem; color: var(--primary-color); }

.booth-results {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.result-list {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.booth-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.booth-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.booth-info strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.distance { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.25rem; }

.booth-status { display: flex; align-items: center; gap: 1rem; }
.wait-time { font-size: 0.85rem; font-weight: 600; color: var(--success); background-color: var(--green-light); padding: 4px 8px; border-radius: 4px; }

/* Simulation UI */
.simulation-container {
    max-width: 800px;
    margin: 0 auto;
}

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 3px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    background-color: var(--bg-body);
    border: 3px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    z-index: 2;
    color: var(--text-muted);
    transition: var(--transition);
}

.step.active {
    border-color: var(--saffron);
    color: var(--saffron);
    box-shadow: 0 0 15px var(--saffron-light);
}

.step.completed {
    background-color: var(--green);
    color: white;
    border-color: var(--green);
}

.sim-content {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sim-content.active {
    opacity: 1;
    transform: scale(1);
}

.sim-icon {
    width: 80px; height: 80px;
    background-color: rgba(0, 0, 128, 0.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.sim-action { margin-top: 2.5rem; }

.sim-feedback {
    margin-top: 1.5rem;
    color: var(--success);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background-color: var(--green-light);
    border-radius: 8px;
    animation: slideUp 0.3s ease;
}

/* EVM Styles Premium */
.evm-machine {
    background-color: #cbd5e1;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 8px solid #94a3b8;
    margin-top: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1), var(--shadow-lg);
    position: relative;
}

[data-theme="dark"] .evm-machine { background-color: #334155; border-color: #1e293b; }

.evm-machine::before {
    content: 'EVM READY';
    position: absolute;
    top: 10px; right: 20px;
    font-size: 0.7rem; font-weight: bold; color: var(--success);
    letter-spacing: 1px;
}

.candidate-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    color: #0f172a;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.candidate-row .party { display: block; font-size: 0.8rem; color: #64748b; }

.evm-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background-color: #3b82f6;
    border: 3px solid #1e3a8a;
    cursor: pointer;
    box-shadow: 0 4px 0 #1e3a8a, 0 5px 10px rgba(0,0,0,0.3);
    transition: all 0.1s;
}

.nota-btn { background-color: #ef4444; border-color: #7f1d1d; box-shadow: 0 4px 0 #7f1d1d, 0 5px 10px rgba(0,0,0,0.3); }

.evm-btn:active, .evm-btn.pressed {
    transform: translateY(4px);
    box-shadow: 0 0 0 transparent, inset 0 3px 5px rgba(0,0,0,0.4);
}

/* VVPAT */
.vvpat-machine {
    background-color: #e2e8f0;
    padding: 2rem;
    border-radius: 12px;
    border: 6px solid #64748b;
    margin-top: 2rem;
    width: 280px;
    box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .vvpat-machine { background-color: #475569; }

.vvpat-window {
    background-color: rgba(255, 255, 255, 0.85);
    height: 180px;
    border: 4px solid #334155;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.slip {
    background-color: #fdfdfd;
    padding: 1.5rem 1rem;
    border: 1px dashed #94a3b8;
    text-align: center;
    color: #0f172a;
    width: 90%;
    animation: dropSlip 7s forwards cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.slip-header { font-weight: bold; border-bottom: 1px solid #cbd5e1; padding-bottom: 0.5rem; margin-bottom: 0.5rem; font-size: 0.9rem;}
.slip-title { font-size: 0.85rem; color: #64748b; margin-bottom: 0.25rem;}
.slip-serial { font-size: 0.75rem; color: #94a3b8; margin-top: 1rem; border-top: 1px solid #cbd5e1; padding-top: 0.5rem;}

@keyframes dropSlip {
    0% { transform: translateY(-120%); opacity: 0; }
    10% { transform: translateY(0); opacity: 1; }
    90% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(120%); opacity: 0; }
}

/* Timeline Tricolor Theme */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 24px;
    width: 4px;
    background: var(--tricolor-gradient);
    border-radius: 4px;
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    width: 50px; height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px var(--bg-card), var(--shadow-md);
}

/* Color markers specifically for stages */
.timeline-item:nth-child(1) .timeline-marker { background-color: var(--saffron); }
.timeline-item:nth-child(2) .timeline-marker { background-color: var(--saffron); }
.timeline-item:nth-child(3) .timeline-marker { background-color: var(--primary-color); }
.timeline-item:nth-child(4) .timeline-marker { background-color: var(--green); }
.timeline-item:nth-child(5) .timeline-marker { background-color: var(--green); }

.timeline-content {
    margin-left: 2rem;
    background-color: var(--bg-body);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    flex-grow: 1;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Quiz UI */
.quiz-container {
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
}

.quiz-hero-icon {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

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

.progress-bar {
    height: 10px;
    background-color: var(--bg-body);
    border-radius: 5px;
    margin-bottom: 2.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--tricolor-gradient);
    transition: width 0.3s ease;
}

.quiz-question {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-option {
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-body);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.quiz-option::before {
    content: '';
    display: inline-block;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    margin-right: 15px;
    transition: var(--transition);
}

.quiz-option:hover:not(:disabled) {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.quiz-option.correct {
    background-color: var(--green-light);
    border-color: var(--success);
    color: var(--success);
}

.quiz-option.correct::before {
    border-color: var(--success);
    background-color: var(--success);
    box-shadow: inset 0 0 0 3px var(--bg-body);
}

.quiz-option.wrong {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.quiz-option.wrong::before {
    border-color: var(--error);
    background-color: var(--error);
}

.quiz-option:disabled { cursor: not-allowed; }
/* News Feed UI */
.news-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.news-card {
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.news-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--saffron);
    color: white;
    box-shadow: var(--shadow-sm);
}

.news-source {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.news-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.news-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.news-link:hover {
    color: var(--saffron);
    text-decoration: underline;
}

/* Skeleton Loader */
.skeleton-loader {
    overflow: hidden;
    position: relative;
}

.skeleton-loader::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: skeleton-shine 1.5s infinite;
}

@keyframes skeleton-shine {
    to { transform: translateX(100%); }
}
.quiz-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-body);
    border-radius: 12px;
    border-left: 5px solid var(--primary-color);
    text-align: left;
    animation: slideUp 0.3s ease;
}

.final-score {
    margin: 3rem 0;
}

.final-score h2 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.quiz-badge {
    font-size: 1.2rem;
    background-color: var(--secondary-color);
    padding: 1rem 2rem;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

/* Metrics & Engagement UI */
.metric-item h4 {
    margin: 0;
    font-family: var(--font-accent);
    letter-spacing: -0.5px;
}

.feedback-widget {
    transition: var(--transition);
}

.feedback-widget:hover {
    box-shadow: var(--shadow-lg);
}

.feedback-btn {
    transition: all 0.2s ease;
}

.feedback-btn:hover:not(:disabled) {
    background: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.05);
}

.feedback-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 768px) {
    .dashboard-grid > div[style*=" grid-column: span 2\] {
 grid-column: span 1 !important;
 flex-direction: column !important;
 gap: 1.5rem;
 }
 
 .metric-item {
 border-left: none !important;
 padding-left: 0 !important;
 }
}
