:root {
    color-scheme: light;
    --background: #eef3f6;
    --surface: #ffffff;
    --surface-soft: #f7fafb;
    --text: #17252d;
    --muted: #60717b;
    --border: #d8e1e6;
    --primary: #006b78;
    --primary-dark: #00515b;
    --accent: #0b7a4b;
    --danger: #a32222;
    --danger-soft: #fff0f0;
    --info-soft: #edf7fa;
    --shadow: 0 18px 55px rgba(29, 52, 63, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(0, 107, 120, 0.10), transparent 36rem),
        var(--background);
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.page-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 22px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
    padding: 0 4px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    color: var(--text);
    text-decoration: none;
}

.site-logo {
    display: block;
    width: 120px;
    height: auto;
    flex: 0 0 auto;
}

.site-title {
    font-size: 1.45rem;
    font-weight: 780;
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.eyebrow {
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.card {
    width: 100%;
    margin: 0 auto;
    padding: clamp(24px, 5vw, 52px);
    border: 1px solid rgba(216, 225, 230, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card.narrow {
    max-width: 480px;
}

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

.login-card .stack {
    text-align: left;
}

.icon-circle {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--info-soft);
    font-size: 1.55rem;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.lead {
    margin: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.stack {
    display: grid;
    gap: 14px;
    margin-top: 26px;
}

label {
    font-weight: 720;
}

input[type="password"] {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: #fff;
    outline: none;
}

input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 107, 120, 0.12);
}

.button,
.text-button {
    border: 0;
    cursor: pointer;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 19px;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 760;
    transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button.primary {
    color: #fff;
    background: var(--primary);
}

.button.primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.button.secondary {
    color: var(--primary);
    background: var(--info-soft);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.text-button {
    padding: 8px 0;
    color: var(--muted);
    background: transparent;
    font-weight: 700;
}

.text-button:hover {
    color: var(--primary);
}

.message {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 11px;
    line-height: 1.5;
}

.message.error {
    border: 1px solid #f0c7c7;
    color: var(--danger);
    background: var(--danger-soft);
}

.message.info {
    border: 1px solid #cfe4e9;
    color: #23505a;
    background: var(--info-soft);
}

.message.success {
    border: 1px solid #bfe2cf;
    color: #145e3b;
    background: #edf9f2;
}

.hidden {
    display: none !important;
}

.dashboard-heading {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.action-grid.single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 540px;
}

.action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    min-height: 116px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    background: var(--surface-soft);
    text-decoration: none;
    transition: border-color 130ms ease, transform 130ms ease, box-shadow 130ms ease;
}

.action-card:hover:not(.disabled) {
    transform: translateY(-2px);
    border-color: rgba(0, 107, 120, 0.45);
    box-shadow: 0 12px 30px rgba(29, 52, 63, 0.10);
}

.action-card.accent:hover {
    border-color: rgba(11, 122, 75, 0.45);
}

.action-card.disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.action-card strong,
.action-card small {
    display: block;
}

.action-card strong {
    margin-bottom: 5px;
    font-size: 1.08rem;
}

.action-card strong:last-child {
    margin-bottom: 0;
}

.action-card small {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.action-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: #e8f2f4;
    font-size: 1.4rem;
}

.action-card.accent .action-icon {
    background: #e7f5ed;
}

.arrow {
    color: var(--primary);
    font-size: 1.55rem;
}

.admin-link {
    margin: 24px 0 0;
    text-align: right;
}

.admin-link a,
.breadcrumb a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 680;
    text-decoration: none;
}

.admin-link a:hover,
.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb {
    margin-bottom: 28px;
}

.upload-card {
    max-width: 820px;
}

.drop-zone {
    display: grid;
    place-items: center;
    min-height: 250px;
    padding: 34px;
    border: 2px dashed #abc2ca;
    border-radius: 16px;
    color: var(--text);
    background: var(--surface-soft);
    text-align: center;
    cursor: pointer;
    transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.drop-zone:hover,
.drop-zone.dragover,
.drop-zone:focus-visible {
    border-color: var(--primary);
    background: #f0f8f9;
    outline: none;
}

.drop-zone.dragover {
    transform: scale(1.006);
}

.drop-zone.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.drop-zone strong,
.drop-zone span,
.drop-zone small {
    display: block;
}

.drop-zone strong {
    margin: 10px 0 5px;
    font-size: 1.2rem;
}

.drop-zone span,
.drop-zone small {
    color: var(--muted);
}

.drop-zone small {
    margin-top: 13px;
}

.drop-icon {
    display: grid !important;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff !important;
    background: var(--primary);
    font-size: 1.6rem;
    font-weight: 800;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.empty-selection {
    padding: 4px 0;
    color: var(--muted);
    text-align: center;
}

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

.file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-soft);
}

.file-name {
    min-width: 0;
}

.file-name strong,
.file-name small {
    display: block;
}

.file-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name small,
.file-status {
    color: var(--muted);
    font-size: 0.84rem;
}

.file-row.success .file-status {
    color: var(--accent);
    font-weight: 700;
}

.file-row.error .file-status {
    color: var(--danger);
    font-weight: 700;
}

.remove-file {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
}

.remove-file:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.check-list {
    display: grid;
    gap: 1px;
    overflow: hidden;
    margin: 26px 0;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--border);
}

.check-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
}

.check-row > span:last-child {
    color: var(--muted);
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.status-dot.ok {
    background: #18965b;
}

.status-dot.fail {
    background: #c53636;
}

.site-footer {
    padding: 24px 4px 0;
    color: #7d8c94;
    font-size: 0.82rem;
    text-align: center;
}

code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.055);
}

@media (max-width: 720px) {
    .page-shell {
        width: min(100% - 20px, 1080px);
        padding-top: 16px;
    }

    .site-header {
        margin-bottom: 20px;
    }

    .site-brand {
        gap: 10px;
    }

    .site-logo {
        width: 92px;
    }

    .site-title {
        font-size: 1.15rem;
    }

    .card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .action-card {
        min-height: 104px;
        padding: 18px;
    }

    .drop-zone {
        min-height: 220px;
        padding: 26px 18px;
    }

    .file-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .file-status {
        grid-column: 1 / -1;
    }

    .check-row {
        grid-template-columns: auto 1fr;
    }

    .check-row > span:last-child {
        grid-column: 2;
    }
}
