/* ===== UPSC Answer Evaluator Pro - Styles ===== */

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-500: #ef4444;
    --red-600: #dc2626;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-900);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
}

.serif {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ===== Layout ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== Header ===== */
.header {
    background: white;
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    color: var(--slate-900);
}

.logo-text p {
    font-size: 0.7rem;
    color: var(--slate-500);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--slate-500);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-primary:disabled {
    background: var(--slate-200);
    color: var(--slate-400);
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--slate-900);
    color: white;
}

.btn-secondary:hover {
    background: var(--slate-800);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
}

.btn-outline:hover {
    background: var(--slate-100);
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* ===== Main Content ===== */
.main {
    padding: 0.5rem 0;
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.125rem;
    color: var(--slate-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Minimal Hero */
.hero-minimal {
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 1rem;
}

.hero-minimal h2 {
    font-size: 1.75rem;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
}

.hero-minimal p {
    font-size: 0.875rem;
    color: var(--slate-500);
}

/* ===== Card ===== */
.card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-xl);
    overflow: visible;
}

.card-body {
    padding: 2rem;
}

/* ===== Form Elements ===== */
.form-section {
    margin-bottom: 2rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 1rem;
}

.form-label svg {
    color: var(--primary);
}

/* Paper Type Selection - Single Row */
.paper-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.paper-option {
    padding: 0.5rem 0.875rem;
    border: 1.5px solid var(--slate-200);
    border-radius: 999px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.paper-option:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.paper-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.paper-option input {
    display: none;
}

.paper-option span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-600);
}

.paper-option.selected span {
    color: var(--primary-dark);
}

/* ===== Upload Area ===== */
.upload-area {
    border: 2px dashed var(--slate-300);
    border-radius: 0.75rem;
    background: white;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: var(--slate-50);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.upload-area svg {
    width: 32px;
    height: 32px;
    color: var(--slate-400);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--slate-500);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.upload-area strong {
    color: var(--slate-700);
}

.upload-area small {
    color: var(--slate-400);
    font-size: 0.75rem;
}

/* File Preview */
.file-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .file-preview {
        grid-template-columns: repeat(2, 1fr);
    }
}

.file-item {
    border: 1px solid var(--slate-200);
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.file-item-icon {
    height: 80px;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.file-item-info {
    padding: 0.5rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-item-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.file-item-remove {
    background: none;
    border: none;
    color: var(--red-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition);
}

.file-item-remove:hover {
    background: var(--red-50);
}

/* ===== Progress ===== */
.progress-container {
    background: var(--slate-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--slate-200);
}

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

.progress-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-700);
}

.progress-status svg {
    color: var(--primary);
}

.progress-percent {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-700);
}

.progress-bar {
    height: 8px;
    background: var(--slate-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

.progress-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--slate-500);
    margin-top: 0.75rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
    font-size: 0.875rem;
    color: var(--slate-500);
    transition: var(--transition);
}

.progress-step.active {
    border-color: var(--primary-light);
    background: var(--primary-50);
    color: var(--primary-dark);
}

.progress-step.completed {
    border-color: var(--emerald-400);
    background: var(--emerald-50);
    color: var(--emerald-600);
}

.progress-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.progress-step.pending .progress-step-icon {
    background: var(--slate-200);
    color: var(--slate-500);
}

.progress-step.active .progress-step-icon {
    background: var(--primary);
    color: white;
}

.progress-step.completed .progress-step-icon {
    background: var(--emerald-500);
    color: white;
}

.progress-step-text {
    flex: 1;
}

.progress-step-info {
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: help;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    margin-left: auto;
}

.progress-step-info:hover {
    color: var(--primary);
    background: var(--primary-50);
}

.progress-step-info::after {
    content: attr(title);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--slate-800);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    margin-right: 0.5rem;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.progress-step-info:hover::after {
    opacity: 1;
    visibility: visible;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===== Detected Questions Panel (SSE) ===== */
.detected-questions-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--slate-50);
    border-radius: 0.75rem;
    border: 1px solid var(--slate-200);
}

.detected-questions-panel h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0.75rem;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detected-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
    font-size: 0.8125rem;
    transition: var(--transition);
}

.detected-question .q-num {
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

.detected-question .q-text {
    flex: 1;
    color: var(--slate-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detected-question .q-marks {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-500);
    padding: 0.125rem 0.375rem;
    background: var(--slate-100);
    border-radius: 0.25rem;
}

.detected-question .q-status {
    font-weight: 600;
    min-width: 50px;
    text-align: right;
}

.detected-question .q-status.pending {
    color: var(--slate-400);
}

.detected-question .q-status.average {
    color: var(--amber-600);
}

.detected-question .q-status.good {
    color: var(--emerald-600);
}

/* ===== Error Alert ===== */
.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.alert-error {
    background: var(--red-50);
    border: 1px solid var(--red-100);
    color: var(--red-600);
}

.alert-success {
    background: var(--emerald-50);
    border: 1px solid var(--emerald-100);
    color: var(--emerald-600);
}

/* ===== Results Display ===== */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.results-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--slate-500);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.results-back:hover {
    color: var(--slate-900);
}

.results-badge {
    padding: 0.25rem 0.75rem;
    background: var(--primary-100);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 9999px;
}

/* Score Dashboard */
.score-dashboard {
    background: var(--slate-900);
    border-radius: 1rem;
    padding: 1.5rem;
    color: white;
    margin-bottom: 2rem;
}

.score-dashboard-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .score-dashboard-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.score-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.score-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--slate-400);
    font-size: 0.875rem;
}

.score-meta svg {
    width: 16px;
    height: 16px;
}

.score-description {
    color: var(--slate-400);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    max-width: 400px;
}

.score-values {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-item {
    text-align: center;
}

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

.score-item-value.obtained {
    color: var(--emerald-400);
}

.score-item-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-400);
    margin-top: 0.25rem;
}

.score-divider {
    width: 1px;
    height: 64px;
    background: var(--slate-700);
}

/* Questions List */
.questions-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    color: var(--slate-800);
    margin-bottom: 1rem;
}

.questions-section h3 svg {
    color: var(--primary);
}

.question-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.question-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    background: white;
    border: none;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--slate-200);
    border-radius: 0.75rem 0.75rem 0 0;
}

.question-card.expanded .question-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-header:hover {
    background: var(--slate-50);
}

.question-header-left {
    display: flex;
    gap: 0.75rem;
    flex: 1;
}

.question-number {
    width: 28px;
    height: 28px;
    background: var(--slate-100);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-600);
    flex-shrink: 0;
}

.question-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-900);
    line-height: 1.4;
}

.question-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.question-score {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
    font-weight: 700;
}

.question-score.good {
    background: var(--emerald-50);
    border-color: var(--emerald-200);
    color: var(--emerald-600);
}

.question-score.average {
    background: var(--amber-50);
    border-color: var(--amber-200);
    color: var(--amber-600);
}

.question-score.poor {
    background: var(--red-50);
    border-color: var(--red-200);
    color: var(--red-600);
}

.question-expand {
    color: var(--slate-400);
    transition: var(--transition);
}

.question-card.expanded .question-expand {
    transform: rotate(180deg);
}

/* Question Details */
.question-details {
    border-top: 1px solid var(--slate-100);
    background: var(--slate-50);
    padding: 1.5rem;
    display: none;
}

.question-card.expanded .question-details {
    display: block;
}

.verdict-box {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.verdict-box p {
    font-size: 0.875rem;
    color: var(--slate-700);
    font-style: italic;
    line-height: 1.6;
}

.verdict-label {
    color: var(--primary);
    font-weight: 700;
    font-style: normal;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.detail-section h5 {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.structure-item {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid;
}

.structure-item.intro {
    border-left-color: var(--emerald-400);
}

.structure-item.body {
    border-left-color: var(--primary);
}

.structure-item.conclusion {
    border-left-color: var(--amber-400);
}

.structure-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.structure-item.intro .structure-item-label {
    color: var(--emerald-600);
}

.structure-item.body .structure-item-label {
    color: var(--primary);
}

.structure-item.conclusion .structure-item-label {
    color: var(--amber-600);
}

.structure-item p {
    font-size: 0.75rem;
    color: var(--slate-600);
    line-height: 1.5;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feedback-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--slate-700);
}

.feedback-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.feedback-item.strength svg {
    color: var(--emerald-500);
}

.feedback-item.weakness svg {
    color: var(--red-500);
}

.feedback-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 0.75rem 0;
}

/* Model Pointers */
.model-pointers {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

.model-pointers h5 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-pointers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .model-pointers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.model-pointer-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.model-pointer-num {
    font-weight: 700;
    color: var(--primary-light);
}

/* Value Additions Missing Section */
.value-additions {
    background: linear-gradient(135deg, var(--amber-50) 0%, #fff9e6 100%);
    border: 1px solid var(--amber-200);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
}

.value-additions h5 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--amber-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.value-additions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.value-addition-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.6);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    border-left: 3px solid var(--amber-400);
}

.addition-bullet {
    font-weight: 700;
    color: var(--amber-500);
    font-size: 1rem;
}

/* Suggested Conclusions Section */
.suggested-conclusions {
    background: linear-gradient(135deg, var(--emerald-50) 0%, #e6fff5 100%);
    border: 1px solid var(--emerald-200);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-top: 1rem;
}

.suggested-conclusions h5 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--emerald-700);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conclusions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conclusion-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--emerald-400);
}

.conclusion-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--emerald-600);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.25rem;
}

.conclusion-item p {
    font-size: 0.875rem;
    font-style: italic;
    color: var(--slate-700);
    line-height: 1.5;
    margin: 0;
}

/* ===== Compact Feedback Grid (3-column) ===== */
.compact-feedback-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .compact-feedback-grid {
        grid-template-columns: 1fr;
    }
}

.compact-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.compact-section {
    background: var(--slate-50);
    border-radius: 0.5rem;
    padding: 0.625rem;
    border: 1px solid var(--slate-200);
}

.compact-section.structure {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.compact-section.additions {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: var(--amber-200);
}

.compact-section.pointers {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary-100);
}

.compact-section.conclusions {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: var(--emerald-200);
}

.compact-section h6 {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.compact-item {
    font-size: 0.75rem;
    color: var(--slate-600);
    line-height: 1.4;
    margin-bottom: 0.375rem;
    padding-left: 0.5rem;
    border-left: 2px solid var(--slate-300);
}

.compact-item.intro {
    border-color: var(--primary);
}

.compact-item.body {
    border-color: var(--slate-400);
}

.compact-item.conclusion {
    border-color: var(--emerald-500);
}

.compact-item .label {
    font-weight: 600;
    color: var(--slate-700);
}

.compact-bullet {
    font-size: 0.6875rem;
    color: var(--slate-600);
    line-height: 1.5;
    padding: 0.25rem 0;
}

.compact-bullet.good {
    color: var(--emerald-700);
}

.compact-bullet.warn {
    color: var(--amber-700);
}

.compact-conclusion {
    font-size: 0.6875rem;
    font-style: italic;
    color: var(--slate-600);
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.compact-conclusion .tag {
    font-weight: 700;
    font-style: normal;
    color: var(--emerald-600);
}

/* ===== Dashboard ===== */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.75rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--slate-600);
}

.dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--slate-200);
    border-radius: 9999px;
    background: white;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
    cursor: pointer;
    transition: var(--transition);
}

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

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    border-bottom: 1px solid var(--slate-200);
}

.history-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.875rem;
    color: var(--slate-700);
}

.history-table tr:hover td {
    background: var(--slate-50);
}

.history-table .paper-type-cell {
    font-weight: 500;
    color: var(--slate-900);
}

.history-table .score-cell {
    font-weight: 700;
}

.history-table .score-cell.good {
    color: var(--emerald-600);
}

.history-table .score-cell.average {
    color: var(--amber-600);
}

.history-table .score-cell.poor {
    color: var(--red-600);
}

.history-table .date-cell {
    color: var(--slate-500);
}

.history-table .filename-cell {
    color: var(--slate-600);
    font-size: 0.75rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-table .action-cell {
    text-align: right;
}

/* Custom Tooltip for Paper Type Cell */
.paper-type-cell.has-tooltip {
    position: relative;
    cursor: pointer;
}

.paper-type-cell .tooltip-box {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 380px;
    max-width: 500px;
    background: white;
    color: var(--slate-700);
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.6875rem;
    line-height: 1.5;
    z-index: 1000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--slate-200);
    margin-top: 0.375rem;
}

.paper-type-cell.has-tooltip:hover .tooltip-box {
    display: block;
}

.tooltip-box .tooltip-q {
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-600);
}

.tooltip-box .tooltip-q:last-child {
    border-bottom: none;
}

.view-btn {
    padding: 0.375rem 0.75rem;
    background: var(--primary-50);
    color: var(--primary);
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    background: var(--primary-100);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--slate-500);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--slate-300);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--slate-900);
    color: var(--slate-400);

    margin-top: 5rem;
    border-top: 1px solid var(--slate-800);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.footer-logo span {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.footer-description {
    max-width: 400px;
    margin: 0 auto 2rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--slate-800);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: center;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* ===== Feature Cards ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon.emerald {
    background: var(--emerald-100);
    color: var(--emerald-600);
}

.feature-icon.amber {
    background: var(--amber-100);
    color: var(--amber-600);
}

.feature-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.feature-card h4 {
    font-size: 1rem;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--slate-500);
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

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

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

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

/* ===== Status Panel ===== */
.status-panel {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

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

.status-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
}

.status-refresh {
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition);
}

.status-refresh:hover {
    background: var(--slate-100);
    color: var(--slate-600);
}

.status-refresh.spinning svg {
    animation: spin 1s linear infinite;
}

.status-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--slate-50);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--slate-200);
    transition: var(--transition);
}

.status-item.success {
    background: var(--emerald-50);
    border-color: var(--emerald-200);
}

.status-item.error {
    background: var(--red-50);
    border-color: var(--red-200);
}

.status-item.loading {
    background: var(--slate-50);
    border-color: var(--slate-200);
}

.status-icon {
    font-size: 1rem;
}

.status-label {
    font-weight: 600;
    color: var(--slate-700);
}

.status-item.success .status-label {
    color: var(--emerald-700);
}

.status-item.error .status-label {
    color: var(--red-700);
}

.status-value {
    color: var(--slate-500);
    font-size: 0.75rem;
}

.status-item.success .status-value {
    color: var(--emerald-600);
}

.status-item.error .status-value {
    color: var(--red-600);
}

@media (max-width: 640px) {
    .status-checks {
        flex-direction: column;
    }

    .status-item {
        width: 100%;
    }
}