/* DocPipeline — AllergyInsight 랜딩과 동일 계열 (다크 슬레이트 + 바이올렛 액센트) */
:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.85);
    --card-bg-hover: rgba(30, 41, 59, 0.95);
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #8b5cf6;
    --accent-soft: #a78bfa;
    --danger: #f87171;
    --success: #34d399;
    --border-color: rgba(148, 163, 184, 0.15);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* ── Nav ── */
.nav {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
}

.nav-brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f1f5f9;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-brand span { color: var(--accent-soft); }

.nav-right { display: flex; align-items: center; gap: 0.7rem; }

.nav-user { font-size: 0.85rem; color: var(--text-muted); }

.badge-admin {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.35rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s, background 0.18s, border-color 0.18s;
    font-family: inherit;
}

.btn-sm { font-size: 0.82rem; padding: 0.5rem 0.9rem; }

.btn-primary { background: var(--accent); color: #f5f3ff; border-color: var(--accent); }
.btn-primary:hover { background: #7c3aed; transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}
.btn-outline:hover { border-color: var(--accent-soft); color: var(--accent-soft); }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Hero ── */
.hero { text-align: center; padding: 4rem 1.5rem 3rem; }

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: #f1f5f9;
}

.hero-brand { color: var(--accent-soft); }

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-trust { font-size: 0.85rem; color: var(--text-dim); }

/* ── Section / Cards ── */
.section { padding: 2.5rem 0 0; }

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    color: #f1f5f9;
    margin: 0 0 1.6rem;
    letter-spacing: -0.02em;
}

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.4rem 1.3rem;
    transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(167, 139, 250, 0.4);
    background: var(--card-bg-hover);
}

.card-icon { font-size: 1.7rem; }

.card-name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0.55rem 0 0.2rem;
}

.card-headline {
    font-size: 0.85rem;
    color: var(--accent-soft);
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; }

/* ── Steps ── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.step {
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.3rem 1rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.18);
    color: var(--accent-soft);
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.step-label { font-weight: 700; color: #f1f5f9; margin-bottom: 0.25rem; }
.step-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ── Alert / Panel ── */
.alert {
    max-width: 640px;
    margin: 0 auto 1.2rem;
    padding: 0.8rem 1.1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}

.alert-warn {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

.alert-info {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: var(--accent-soft);
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.6rem;
    margin-bottom: 1.2rem;
}

.panel h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0 0 1rem;
}

/* ── Form ── */
.field { margin-bottom: 1.1rem; }

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.field input[type="url"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    padding: 0.75rem 0.9rem;
    font-size: 0.92rem;
    font-family: inherit;
}

.field input[type="url"]:focus { outline: none; border-color: var(--accent-soft); }

.dropzone {
    border: 1.5px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.6rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.18s;
}

.dropzone:hover { border-color: var(--accent-soft); }

.file-list { list-style: none; padding: 0; margin: 0.7rem 0 0; }

.file-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.83rem;
    color: var(--text-muted);
    padding: 0.3rem 0.2rem;
    border-bottom: 1px solid var(--border-color);
}

.hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.4rem; }

.divider {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 1.1rem 0;
}

/* ── Status ── */
.status-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
}

.status-PENDING { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-PROCESSING { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.status-DONE { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.status-FAILED, .status-CANCELED { background: rgba(248, 113, 113, 0.15); color: var(--danger); }

.result-box {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-color);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 480px;
    overflow-y: auto;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(148, 163, 184, 0.25);
    border-top-color: var(--accent-soft);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 2.5rem 0 2rem;
}

@media (max-width: 640px) {
    .hero h1 { font-size: 1.9rem; }
}
