*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green: #4a7c00;
    --green-dark: #3a6200;
    --green-light: #f0f5e8;
    --green-mid: #5c9900;
    --error: #c0392b;
    --error-bg: #fdf2f1;
    --text: #1a1a1a;
    --text-muted: #555;
    --border: #d0d5dd;
    --border-focus: #4a7c00;
    --bg: #ffffff;
    --panel-bg: #1a2200;
    --radius: 6px;
    --shadow-input: 0 1px 3px rgba(0,0,0,.08);
    --text-secondary: #64748b;
    --text-primary: #0f172a;
    --color-slate-100: #f1f5f9;
    --color-slate-50: #f8fafc;
}

html { font-size: 16px; }

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--green);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
    transition: top .15s;
}
.skip-link:focus { top: 1rem; }

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 2rem;
    border-bottom: 1px solid #e8ede0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}
.logo { display: flex; align-items: center; gap: .4rem; }
.logo-mark {
    font-size: 1.35rem;
    color: var(--green);
    line-height: 1;
}
.logo-sub { font-size: .6rem; color: #777; letter-spacing: .04em; margin-top: 2px; }

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

.lang-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .35rem .75rem;
    font-size: .875rem;
    font-family: inherit;
    background: var(--bg);
    cursor: pointer;
    color: var(--text);
}
.lang-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.lang-dropdown {
    position: relative;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    min-width: 160px;
    z-index: 1000;
    display: none;
    padding: 0.5rem 0;
}

.lang-dropdown:focus-within .lang-menu,
.lang-dropdown.active .lang-menu {
    display: block;
}

.lang-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s;
}

.lang-menu li a:hover {
    background: var(--green-light);
    color: var(--green);
}

.lang-menu li.selected a {
    font-weight: 600;
    color: var(--green);
    background: var(--green-light);
}

.nav-login { font-size: .875rem; color: var(--text-muted); }
.nav-login a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.nav-login a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 2px; }

.layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
}

.form-panel {
    padding: 3.5rem 3rem 3rem;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 0 0 auto;
    justify-content: center;
    width: 100%;
}

h1 {
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -.01em;
    margin-bottom: 1.5rem;
    color: var(--text);
    width: 100%;
}

.steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.75rem;
}
.step-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .6rem;
    position: relative;
    cursor: default;
}
.step-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    border-radius: 2px;
    transition: background .25s;
}
.step-item.active::after { background: var(--green); }
.step-item + .step-item { margin-left: 1.5rem; }

.step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background .25s, color .25s;
}
.step-item.done .step-badge { background: var(--text); color: #fff; }
.step-item.active .step-badge { background: var(--green); color: #fff; }
.step-item.pending .step-badge { background: #e5e7eb; color: #888; }

.step-label {
    font-size: .875rem;
    font-weight: 500;
    transition: color .25s;
}
.step-item.active .step-label { color: var(--green); }
.step-item.done .step-label { color: var(--text); }
.step-item.pending .step-label { color: #aaa; }

.form-notice {
    font-size: .8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-step { display: none; }
.form-step.active { display: block; }

.field { margin-bottom: 1.25rem; }

label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .375rem;
    color: var(--text);
}
.req {
    color: var(--error);
    font-weight: 700;
}
label .req {
    margin-left: .2rem;
    aria-hidden: true;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: .625rem .875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9375rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    box-shadow: var(--shadow-input);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(74,124,0,.18);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
    border-color: var(--error);
    background: var(--error-bg);
}
input[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(192,57,43,.18);
}

textarea { resize: vertical; min-height: 88px; }

.auth_select-wrap { position: relative; }
.auth_select-wrap::after {
    content: '';
    position: absolute;
    right: .875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #555;
    pointer-events: none;
}

.auth_password-row { position: relative; }
.auth_password-row input { padding-right: 2.5rem; }
.auth_show-pwd-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}
.auth_show-pwd-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: var(--radius); }
.auth_show-pwd-btn:hover { color: var(--green); }
.auth_show-pwd-btn .auth_eye-icon {
    width: 20px; height: 20px;
    background-image: url('/images/auth/eye-off.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
.auth_show-pwd-btn[data-state="hidden"] .auth_eye-icon {
    background-image: url('/images/auth/eye.svg');
    background-repeat: no-repeat;
}
.auth_field-error {
    display: none;
    font-size: .78125rem;
    color: var(--error);
    margin-top: .35rem;
    font-weight: 500;
}
.auth_field-error.visible { display: flex; align-items: flex-start; gap: .3rem; }
.auth_field-error::before { content: '⚠'; font-size: .85rem; flex-shrink: 0; margin-top: 1px; }
.auth_alert-icon { flex-shrink: 0; margin-top: 1px; }

.auth_pwd-hint {
    font-size: .78125rem;
    color: var(--text-muted);
    margin-top: .35rem;
    line-height: 1.4;
}
.auth_pwd-hint.error { color: var(--error); font-weight: 500; }

.auth_checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    margin-bottom: 1.5rem;
}
.auth_checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: .1rem;
    accent-color: var(--green);
    cursor: pointer;
    border-radius: 3px;
}
.auth_checkbox-field input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}
.auth_checkbox-label {
    font-size: .8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.auth_checkbox-label a { color: var(--green); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: .25rem; }
.auth_checkbox-link::after {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    background-image: url('/images/auth/external-link.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.auth_btn-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-top: 1.5rem; }

.auth_btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .7rem 1.5rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .1s;
    text-decoration: none;
}
.auth_btn-primary:hover { background: var(--green-dark); }
.auth_btn-primary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(74,124,0,.2); }
.auth_btn-primary:active { transform: scale(.98); }
.auth_btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.auth_btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .7rem 1.25rem;
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9375rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-decoration: none;
}
.auth_btn-ghost:hover { border-color: var(--green); background: var(--green-light); }
.auth_btn-ghost:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

#live-announce { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.auth_right-panel {
    background: var(--panel-bg) url('/images/auth/bg.svg') no-repeat center center;
    background-size: cover;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 500px;
}
.auth_center-logo {
    max-width: 240px;
    height: auto;
    position: relative;
    z-index: 2;
    width: 200px;
}
.auth_brand-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 1px;
    opacity: .55;
}
.auth_brand-cell {
    border: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    letter-spacing: .01em;
    background: rgba(255,255,255,.015);
}
.auth_panel-copy {
    position: relative;
    z-index: 2;
}
.auth_panel-copy h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    line-height: 1.15;
    margin-bottom: .75rem;
}
.auth_panel-copy p {
    font-size: .9375rem;
    color: rgba(255,255,255,.7);
    line-height: 1.6;
    max-width: 380px;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: .75rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
}
footer a { color: #555; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .auth_right-panel { display: none; }
    .form-panel { padding: 2rem 1.25rem; }
    h1 { font-size: 1.6rem; }
    header { padding: .75rem 1.25rem; }
}

#success-screen {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    animation: fadeUp .4s ease both;
}
#success-screen.active { display: flex; }
.success-icon { font-size: 2.5rem; }
.success-title { font-size: 1.75rem; }
.success-msg { color: var(--text-muted); font-size: .9375rem; line-height: 1.6; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.form-steps-wrapper { animation: fadeUp .3s ease both; }

.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;
}

.auth_spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

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

.auth_form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.1);
    display: none;
    z-index: 50;
}

.auth_form-overlay.active { display: block; }

.form-panel.loading input,
.form-panel.loading select,
.form-panel.loading textarea,
.form-panel.loading button:not(#btn-create) {
    pointer-events: none;
    opacity: .6;
}

.auth_form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.auth_form-header.hidden {
    display: none;
}

.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;
}

.form__error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 0.25rem;
    color: #721c24;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

.form__error:not(:empty) {
    display: block;
}



.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    font-weight: 500;
}
.nav-link:hover {
    color: var(--text-primary);
    background: var(--color-slate-100);
}

.dropdown-toggle .icon-size-20 { width: 20px; height: 20px; }
.dropdown-toggle .icon-size-18 { width: 18px; height: 18px; }
.dropdown-toggle .icon-size-16 { width: 16px; height: 16px; }
.dropdown-toggle .icon-size-14 { width: 14px; height: 14px; }
.dropdown-toggle .icon-size-12 { width: 12px; height: 12px; }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    min-width: 220px;
    display: none;
    padding: 8px 0;
    margin-top: 10px;
    z-index: 1100;
    list-style: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu--compact { min-width: auto; width: fit-content; white-space: nowrap; }
.dropdown-menu__link {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.dropdown-menu__link:hover {
    background: var(--color-slate-50);
    color: var(--text-primary);
}

.dropdown-menu__header {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.link {
    color: var(--green);
}