:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #1d252c;
    --muted: #637381;
    --line: #dbe3ea;
    --primary: #126b5f;
    --primary-dark: #0b4f46;
    --danger: #b42318;
    --success-bg: #e7f6ec;
    --success-text: #176b3a;
    --error-bg: #fdecec;
    --error-text: #9f1d1d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.page {
    width: min(1080px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0;
}

.panel {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(29, 37, 44, 0.08);
    padding: 28px;
}

.upload-panel,
.login-panel {
    max-width: 540px;
}

.admin-panel {
    max-width: 1080px;
}

.brand,
.admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-header {
    justify-content: space-between;
    margin-bottom: 24px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}

p {
    margin: 6px 0 0;
    color: var(--muted);
}

.upload-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

textarea {
    resize: vertical;
}

button,
.button-link,
.logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

button:hover,
.button-link:hover,
.logout:hover {
    background: var(--primary-dark);
}

button:disabled {
    cursor: progress;
    opacity: 0.72;
}

.danger {
    background: var(--danger);
}

.danger:hover {
    background: #8f1c14;
}

.alert {
    margin-top: 18px;
    border-radius: 6px;
    padding: 12px 14px;
    font-weight: 700;
}

.success {
    color: var(--success-text);
    background: var(--success-bg);
}

.error {
    color: var(--error-text);
    background: var(--error-bg);
}

.is-hidden {
    display: none !important;
}

.progress-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #f9fbfc;
}

.progress-top,
.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-top strong {
    font-size: 22px;
}

.progress-top span,
.progress-meta {
    color: var(--muted);
    font-size: 14px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe3ea;
}

.progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 160ms ease;
}

.footer-link {
    margin-top: 20px;
    text-align: center;
}

.footer-link a {
    color: var(--primary);
    font-weight: 700;
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
}

td strong,
td small {
    display: block;
}

td small {
    margin-top: 5px;
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.actions form {
    margin: 0;
}

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

    .panel {
        padding: 20px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: 24px;
    }

    th,
    td {
        min-width: 140px;
    }
}
