/* Accessibility Assistant web UI */

:root {
    --bg: #f0f4f8;
    --surface: #ffffff;
    --border: #c8d6e5;
    --text: #1a2a3a;
    --text-muted: #4a6580;
    --accent: #1a56a0;
    --accent-hover: #143f78;
    --accent-light: #e8f0fa;
    --maroon: #7a2033;
    --maroon-light: #f5e6e9;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #92400e;
    --warning-bg: #fef3c7;
    --error: #991b1b;
    --error-bg: #fee2e2;
    --info-bg: #e8f0fa;
    --info: #1a56a0;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ─── Header ─── */

header { text-align: center; margin-bottom: 24px; padding-top: 8px; }
.header-logo { width: 80px; height: 80px; margin-bottom: 8px; border-radius: 12px; }
header h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; color: var(--accent); }
.subtitle { color: var(--text-muted); font-size: 16px; margin-top: 4px; }
.brand-credit { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.brand-link { color: var(--maroon); font-weight: 600; text-decoration: none; }
.brand-link:hover { text-decoration: underline; }

/* ─── User bar ─── */

.user-bar {
    display: flex; justify-content: center; align-items: center;
    font-size: 13px; color: var(--text-muted); margin-top: 8px;
}
.user-bar > * { margin: 0 6px; }
.user-bar .usage-info { font-weight: 500; }
.user-bar .usage-info.unlimited { color: var(--success); }
.user-bar a { color: var(--accent); text-decoration: none; }
.user-bar a:hover { text-decoration: underline; }

/* ─── Banner ─── */

.banner {
    padding: 10px 16px; border-radius: var(--radius);
    margin-bottom: 16px; font-size: 14px; font-weight: 500;
}
.banner.warning { background: var(--warning-bg); border: 1px solid #f59e0b; color: var(--warning); }
.banner.error { background: var(--error-bg); border: 1px solid #ef4444; color: var(--error); }
.banner.info { background: var(--info-bg); border: 1px solid #3b82f6; color: var(--info); }
.hidden { display: none; }

/* ─── Upload zone ─── */

.upload-zone {
    border: 2px dashed #1a56a0; border-radius: var(--radius);
    padding: 40px 24px; text-align: center; cursor: pointer;
    background: #edf2f9;
    transition: border-color 0.2s, background 0.2s; margin-bottom: 24px;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #143f78; background: #dce6f2;
}
.upload-zone.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.upload-icon { color: var(--text-muted); margin-bottom: 8px; }
.file-types { display: flex; justify-content: center; margin-bottom: 8px; }
.file-types > * { margin: 0 4px; }
.upload-text { font-size: 16px; margin-bottom: 4px; }
.upload-link { color: var(--accent); cursor: pointer; text-decoration: underline; font-weight: 500; }
.upload-hint { color: var(--text-muted); font-size: 13px; }

/* ─── Info sections ─── */

.info-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
@media (max-width: 700px) {
    .info-sections { grid-template-columns: 1fr; }
}
.info-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13px;
}
.info-box h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
}
.info-box p {
    color: var(--text-muted);
    line-height: 1.5;
}
.privacy-warning {
    background: #fef9ee;
    border-color: #e5ddd0;
}
.privacy-warning h3 { color: var(--warning); }

/* ─── Two-column layout ─── */

.job-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 700px) {
    .job-columns { grid-template-columns: 1fr; }
}

.job-column { min-height: 120px; }
.column-title {
    font-size: 14px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-muted);
    margin-bottom: 12px; padding-bottom: 6px;
    border-bottom: 2px solid var(--border);
}
.job-list { }
.empty-state { color: var(--text-muted); font-size: 14px; font-style: italic; padding: 16px 0; }

/* ─── Job cards ─── */

.job-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}

.job-filename {
    font-weight: 600; font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.job-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Progress */
.progress-bar {
    height: 4px; background: #e5e7eb; border-radius: 2px;
    overflow: hidden; margin-top: 8px;
}
.progress-bar .fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    transition: width 0.3s; animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Buttons */
.job-actions { display: flex; margin-top: 10px; }
.job-actions > * { margin-right: 8px; }
.btn {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--surface); color: var(--text);
    font-size: 13px; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: background 0.15s;
}
.btn:hover { background: #f3f4f6; }
.btn-primary {
    background: var(--maroon); border-color: var(--maroon);
    color: #fff; font-weight: 600;
}
.btn-primary:hover { background: #5c1827; }

/* ─── Inline report ─── */

.report-inline {
    margin-top: 10px; padding: 10px 12px;
    border-radius: 6px; font-size: 13px;
}
.report-clean {
    background: var(--success-bg); color: var(--success);
    font-weight: 600;
}
.report-issues { background: #fef9ee; border: 1px solid #e5ddd0; }

.report-section { margin-bottom: 6px; }
.report-section:last-child { margin-bottom: 0; }
.report-section-title {
    font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.report-section-title.errors { color: var(--error); }
.report-section-title.advisory { color: var(--text-muted); }

.report-item {
    font-size: 13px; color: var(--text);
    padding: 1px 0;
}
.report-item .slide-num {
    color: var(--text-muted); font-size: 12px;
}

/* Failed card */
.job-error {
    margin-top: 8px; padding: 8px 10px;
    background: var(--error-bg); border-radius: 6px;
    color: var(--error); font-size: 13px;
}

/* ─── Landing page ─── */

.landing { max-width: 800px; }

.hero {
    text-align: center; padding: 32px 0 40px;
}
.hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.hero > p { color: var(--text-muted); font-size: 16px; max-width: 560px; margin: 0 auto 20px; line-height: 1.6; }
.hero-cta { display: flex; justify-content: center; margin-bottom: 12px; }
.hero-cta > * { margin: 0 6px; }
.hero-tested {
    font-size: 14px; color: var(--text-muted); font-style: italic;
    max-width: 560px; margin: 0 auto 16px; line-height: 1.6;
}
.hero-note { font-size: 13px; color: var(--text-muted); }

.btn-large { padding: 10px 28px; font-size: 15px; }

.features { margin-bottom: 32px; }
.features h2, .how-it-works h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 16px; }
.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 700px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.feature-icon { font-size: 28px; margin-bottom: 6px; }
.feature-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.steps {
    display: flex; justify-content: center; flex-wrap: wrap;
}
.steps > * { margin: 0 12px; }
.step { text-align: center; width: 140px; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--text); color: var(--accent);
    font-weight: 700; font-size: 16px; margin-bottom: 8px;
}
.step p { font-size: 13px; color: var(--text-muted); }

/* ─── Pricing page ─── */

.pricing-hero { text-align: center; margin-bottom: 32px; }
.pricing-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.pricing-hero p { color: var(--text-muted); font-size: 16px; }

.pricing-table-section { margin-bottom: 32px; }
.pricing-table {
    width: 100%; border-collapse: collapse;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden;
}
.pricing-table th, .pricing-table td {
    text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.pricing-table th { background: #f9fafb; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.pricing-table td { font-size: 14px; }
.pricing-base { background: var(--accent-light); }
.price { font-weight: 700; font-size: 16px; white-space: nowrap; }

.pricing-examples { margin-bottom: 32px; }
.pricing-examples h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 16px; }
.example-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .example-grid { grid-template-columns: repeat(2, 1fr); } }
.example-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.example-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.example-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.example-price { font-size: 24px; font-weight: 700; }
.example-breakdown { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.pricing-purdue, .pricing-free {
    text-align: center; padding: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 16px;
}
.pricing-purdue h2, .pricing-free h2 { font-size: 18px; margin-bottom: 8px; }
.pricing-purdue p, .pricing-free p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

.pricing-faq { margin-bottom: 32px; }
.pricing-faq h2 { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 16px; }
.faq-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 10px;
}
.faq-item h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.faq-item p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.privacy-section {
    text-align: center; padding: 24px;
    background: #fef9ee; border: 1px solid #e5ddd0;
    border-radius: var(--radius); margin-bottom: 24px;
}
.privacy-section h2 { font-size: 18px; color: var(--warning); margin-bottom: 8px; }
.privacy-section p { font-size: 14px; color: var(--text); max-width: 600px; margin: 0 auto; line-height: 1.6; }

.deadline-banner {
    text-align: center; padding: 32px 24px;
    background: var(--error-bg); border: 1px solid #ef4444;
    border-radius: var(--radius); margin: 32px 0;
}
.deadline-banner h2 { font-size: 20px; color: var(--error); margin-bottom: 8px; }
.deadline-banner p { color: var(--text); font-size: 14px; margin-bottom: 16px; }

/* ─── Auth pages ─── */

.auth-container {
    display: flex; justify-content: center; padding: 40px 0;
}
.auth-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px; width: 100%; max-width: 400px;
}
.auth-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.auth-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; margin-top: 12px; }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-size: 14px; background: var(--bg);
}
.auth-card input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.btn-full { width: 100%; margin-top: 20px; padding: 10px; font-size: 15px; }
.auth-switch { text-align: center; font-size: 13px; margin-top: 16px; color: var(--text-muted); }
.auth-switch a { color: var(--accent); }
.auth-note {
    text-align: center; font-size: 12px; color: var(--warning);
    margin-top: 12px; padding: 8px; background: var(--warning-bg); border-radius: 6px;
}
.auth-error {
    padding: 8px 12px; background: var(--error-bg); color: var(--error);
    border-radius: 6px; font-size: 13px; margin-bottom: 12px;
}
.purdue-badge {
    padding: 8px 12px; background: #dcfce7; color: var(--success);
    border-radius: 6px; font-size: 13px; margin-top: 12px; text-align: center;
}
.title-link { color: inherit; text-decoration: none; }

/* ─── Admin ─── */

.admin-badge {
    font-size: 12px; font-weight: 600; background: var(--error-bg); color: var(--error);
    padding: 2px 8px; border-radius: 10px; vertical-align: middle;
}
.admin-nav {
    display: flex; margin-bottom: 16px;
}
.admin-nav > * { margin-right: 8px; }
.btn-small { padding: 4px 12px; font-size: 13px; }
.btn-tiny { padding: 2px 8px; font-size: 12px; }
.admin-nav .btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.admin-tab { }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.admin-table th, .admin-table td {
    text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.admin-table th { font-weight: 600; background: #f9fafb; position: sticky; top: 0; }
.detail-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 8px; }
.role-badge.admin { background: var(--error-bg); color: var(--error); }
.role-badge.user { background: #f3f4f6; color: var(--text-muted); }

/* ─── Footer ─── */

footer {
    margin-top: 48px; text-align: center;
    font-size: 12px; color: var(--text-muted);
}
footer p + p { margin-top: 2px; }
.credit { margin-top: 8px; font-weight: 500; color: var(--text); }
.privacy-footer {
    margin-top: 8px; padding: 8px 12px;
    background: var(--maroon-light); border-radius: 6px;
    color: var(--maroon); font-size: 12px; line-height: 1.5;
}
footer a { color: var(--accent); }
