:root {
    --bg: #f5f5f4;
    --white: #ffffff;
    --text: #1c1c1c;
    --muted: #6b7280;
    --border: #e5e7eb;
    --gold: #b8963d;
    --gold-hover: #a68432;
    --gold-soft: #f7f1e3;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --error-bg: #fef2f2;
    --error-text: #b91c1c;
    --success-bg: #ecfdf5;
    --success-text: #047857;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    height: 52px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.user-text {
    color: var(--muted);
}

.user-text strong {
    color: var(--text);
    font-weight: 600;
}

.btn-outline {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}

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

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    width: 100%;
    max-width: 520px;
}

.container-wide {
    max-width: 600px;
}

.page-head {
    text-align: center;
    margin-bottom: 28px;
}

.page-head .logo {
    height: 64px;
    margin: 0 auto 20px;
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid #fecaca;
}

.message.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #a7f3d0;
}

.field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

select.form-control {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 150, 61, 0.15);
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.help-text {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.errorlist {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: var(--error-text);
    font-size: 13px;
}

.btn-primary {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 13px 18px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--gold);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--gold-hover);
}

.upload-zone {
    position: relative;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: #fafafa;
    padding: 32px 20px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.is-dragover {
    border-color: var(--gold);
    background: var(--gold-soft);
}

.upload-zone.has-file {
    border-style: solid;
    border-color: var(--gold);
    background: var(--gold-soft);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gold);
}

.upload-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

.upload-hint {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.file-name {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    word-break: break-word;
}

.footer {
    text-align: center;
    padding: 20px;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 560px) {
    .card {
        padding: 24px 20px;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .user-text {
        display: none;
    }
}
