:root {
    color-scheme: light;
    --page: #f6f8fb;
    --text: #172033;
    --muted: #5f6b7a;
    --accent: #2167ff;
    --accent-soft: rgba(33, 103, 255, 0.08);
    --surface: #ffffff;
    --line: rgba(23, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(160deg, #f7fbff 0%, #eef4ff 50%, #f7f8fb 100%);
    color: var(--text);
}

.login-page,
.setup-placeholder {
    width: min(100% - 32px, 520px);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.login-card {
    width: 100%;
    padding: 28px;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 70px rgba(31, 55, 91, 0.14);
    backdrop-filter: blur(16px);
}

.setup-logo,
.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.login-logo {
    margin-bottom: 14px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.1;
}

p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    text-align: left;
}

.login-form label {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    min-height: 52px;
    border: 1px solid #d8e0ee;
    border-radius: 12px;
    padding: 0 14px;
    color: var(--text);
    font: inherit;
    background: #fff;
}

.login-form input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(33, 103, 255, 0.16);
}

.login-form button {
    min-height: 54px;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(135deg, #2167ff, #20a7b8);
    cursor: pointer;
}

.alert {
    margin-top: 18px;
    border: 1px solid #ffd4d4;
    border-radius: 12px;
    padding: 12px 14px;
    color: #8f1d1d;
    text-align: left;
    background: #fff2f2;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
}

.brand,
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.brand,
.main-nav a {
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.main-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 0 10px;
    color: var(--muted);
}

.main-nav a[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
}

.app-shell {
    width: min(100% - 28px, 980px);
    margin: 24px auto 48px;
}

.page-intro,
.placeholder-panel,
.upload-panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 20px 60px rgba(31, 55, 91, 0.1);
}

.page-intro {
    margin-bottom: 18px;
}

.page-intro h1,
.placeholder-panel h2 {
    margin: 0;
    line-height: 1.15;
}

.page-intro p:last-child,
.placeholder-panel p {
    margin-top: 10px;
}

.placeholder-panel {
    min-height: 180px;
    display: flex;
    align-items: center;
}

.upload-panel {
    display: grid;
    gap: 22px;
}

.upload-copy h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.18;
}

.upload-copy p:last-child {
    margin-top: 8px;
}

.upload-form {
    display: grid;
    gap: 14px;
}

.upload-dropzone {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    border: 2px dashed #b8c7dc;
    border-radius: 18px;
    padding: 28px 18px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff, #f4f8ff);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
    border-color: var(--accent);
    background: #f0f6ff;
    transform: translateY(-1px);
}

.upload-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2167ff, #20a7b8);
}

.upload-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
}

.upload-hint,
.selected-file {
    color: var(--muted);
    font-size: 0.95rem;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.selected-file {
    min-height: 22px;
    text-align: center;
}

.primary-button {
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    padding: 0 20px;
    color: #fff;
    font: inherit;
    font-weight: 850;
    background: linear-gradient(135deg, #2167ff, #20a7b8);
    cursor: pointer;
}

.upload-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.upload-steps li {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--muted);
    background: #fff;
}

.upload-steps li::before {
    content: "";
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ccd6e4;
}

.upload-steps li.is-active {
    color: var(--text);
    border-color: rgba(33, 103, 255, 0.32);
    background: var(--accent-soft);
}

.upload-steps li.is-active::before {
    background: var(--accent);
}

.upload-steps li.is-complete {
    color: #126044;
    border-color: rgba(18, 96, 68, 0.22);
    background: #eefaf5;
}

.upload-steps li.is-complete::before {
    background: #1fa971;
}

.upload-steps li.is-error {
    color: #8f1d1d;
    border-color: #ffd4d4;
    background: #fff2f2;
}

.upload-steps li.is-error::before {
    background: #d73434;
}

.upload-message {
    min-height: 24px;
    color: var(--muted);
    font-weight: 700;
}

.upload-message-success {
    color: #126044;
}

.upload-message-error {
    color: #8f1d1d;
}

@media (max-width: 680px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .main-nav a {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0 12px;
    }

    .upload-panel,
    .page-intro {
        padding: 20px;
    }

    .upload-dropzone {
        min-height: 190px;
    }
}
