:root {
    --bg-dark: #041409;
    --bg-dark-soft: #071a0f;
    --bg-dark-elevated: #0a2214;
    --surface: rgba(10, 30, 20, 0.74);
    --surface-strong: rgba(255, 255, 255, 0.06);
    --surface-border: rgba(255, 255, 255, 0.12);
    --accent: #22c55e;
    --accent-strong: #16a34a;
    --accent-muted: rgba(34, 197, 94, 0.12);
    --text-main: #f8fafc;
    --text-soft: rgba(255, 255, 255, 0.72);
    --text-muted: rgba(255, 255, 255, 0.45);
    --text-faint: rgba(255, 255, 255, 0.3);
    --danger: #fb7185;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --danger-border: rgba(239, 68, 68, 0.28);
    --success: #86efac;
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-border: rgba(34, 197, 94, 0.28);
    --info: #93c5fd;
    --info-bg: rgba(59, 130, 246, 0.14);
    --info-border: rgba(59, 130, 246, 0.28);
    --shadow-accent: 0 10px 30px rgba(22, 163, 74, 0.28);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --font-base: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

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

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.08), transparent 28%),
        var(--bg-dark);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
    width: 100%;
    height: 100%;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    overflow-y: auto;
}

.promo-panel {
    display: none;
    position: relative;
    flex: 1;
    padding: 56px;
    overflow: hidden;
    background: linear-gradient(145deg, #041409 0%, #071f10 50%, #041409 100%);
}

.promo-panel__top,
.feature-list,
.promo-panel__bottom {
    position: relative;
    z-index: 1;
}

.promo-panel__top {
    max-width: 540px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.status-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.65);
    animation: pulse 1.8s infinite;
}

.status-badge__label {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.promo-panel__title {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 1.05;
}

.promo-panel__title span {
    color: var(--accent);
}

.promo-panel__description {
    max-width: 460px;
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.feature-list {
    display: grid;
    gap: 16px;
    margin: 40px 0;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(34, 197, 94, 0.06);
    backdrop-filter: blur(14px);
}

.feature-card__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 9px;
    border-radius: 14px;
    color: var(--accent);
    background: var(--accent-muted);
}

.feature-card__icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}

.feature-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.82rem;
    line-height: 1.65;
}

.promo-panel__bottom {
    max-width: 540px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 14px 12px;
    text-align: center;
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.stat-card strong {
    display: block;
    color: var(--accent);
    font-size: 1.08rem;
}

.stat-card span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.76rem;
}

.customers {
    display: flex;
    align-items: center;
    gap: 14px;
}

.customers__avatars {
    display: flex;
}

.customers__avatars span {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    border: 2px solid #041409;
    border-radius: 999px;
    background: #0c2d18;
    color: #9ae6b4;
    font-size: 0.75rem;
    font-weight: 700;
}

.customers__avatars span:first-child {
    margin-left: 0;
}

.customers p {
    margin: 0;
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.78rem;
}

.promo-panel__ornaments {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ornament {
    position: absolute;
    border-radius: 999px;
}

.ornament--top {
    top: -96px;
    left: -96px;
    width: 380px;
    height: 380px;
    opacity: 0.14;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.7) 0%, transparent 70%);
}

.ornament--right {
    top: 42%;
    right: -120px;
    width: 320px;
    height: 320px;
    opacity: 0.1;
    background: radial-gradient(circle, rgba(22, 163, 74, 0.68) 0%, transparent 72%);
}

.ornament--bottom {
    bottom: -80px;
    left: 28%;
    width: 260px;
    height: 260px;
    opacity: 0.12;
    background: radial-gradient(circle, rgba(21, 128, 61, 0.7) 0%, transparent 72%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.7) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent);
}

.login-panel {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    background: linear-gradient(160deg, #071a0f 0%, #0a2214 60%, #071a0f 100%);
}

.brand-row {
    padding: 40px 24px 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px;
    border-radius: 14px;
    color: #ffffff;
    background: var(--accent-strong);
    box-shadow: 0 16px 34px rgba(34, 197, 94, 0.3);
}

.brand-mark svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-wrapper {
    width: min(100%, 520px);
    margin: 24px 0 0;
    padding: 24px 24px 48px;
}

.form-header {
    margin-bottom: 28px;
}

.form-header__eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.form-header h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.form-header__subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    margin-bottom: 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    animation: fade-in 0.28s ease;
}

.alert--error {
    color: #fca5a5;
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

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

.alert--info {
    color: var(--info);
    background: var(--info-bg);
    border-color: var(--info-border);
}

.alert__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.alert__icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 20px;
}

.field-group label {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.field-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-control {
    position: relative;
}

.field-control__icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 18px;
    height: 18px;
    color: rgba(34, 197, 94, 0.8);
    transform: translateY(-50%);
    pointer-events: none;
}

.field-control__icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-control input {
    width: 100%;
    min-height: 58px;
    padding: 16px 52px 16px 46px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: var(--radius-md);
    background: rgba(10, 30, 20, 0.6);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-control input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.field-control input:focus {
    border-color: rgba(34, 197, 94, 0.62);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background: rgba(10, 30, 20, 0.82);
}

.field-control input.is-invalid {
    border-color: rgba(251, 113, 133, 0.58);
    background: rgba(127, 29, 29, 0.16);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.6);
}

.password-toggle svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle__show,
.password-toggle__hide {
    width: 18px;
    height: 18px;
}

.password-toggle__hide {
    display: none;
}

.password-toggle.is-active .password-toggle__show {
    display: none;
}

.password-toggle.is-active .password-toggle__hide {
    display: block;
}

.field-error {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 18px;
    margin: 8px 0 0;
    color: #fda4af;
    font-size: 0.78rem;
    line-height: 1.4;
}

.field-error.is-visible {
    display: flex;
    animation: fade-in 0.28s ease;
}

.text-link {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: #86efac;
}

.submit-button {
    width: 100%;
    min-height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: var(--shadow-accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.34);
    filter: brightness(1.04);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button__arrow {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.submit-button__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 1);
    border-radius: 999px;
    animation: spin 0.7s linear infinite;
}

.submit-button.is-loading {
    pointer-events: none;
    opacity: 0.78;
}

.submit-button.is-loading .submit-button__spinner {
    display: inline-block;
}

.submit-button.is-loading .submit-button__arrow {
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
}

.divider span {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.divider p {
    margin: 0;
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.76rem;
}

.social-button {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.76);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-button svg {
    width: 18px;
    height: 18px;
}

.account-note {
    margin: 24px 0 0;
    color: var(--text-faint);
    font-size: 0.82rem;
    text-align: center;
}

.account-note .text-link {
    margin-left: 6px;
}

.is-shaking {
    animation: shake 0.4s ease-in-out;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.7;
    }
}

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

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    75% {
        transform: translateX(6px);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1100px) {
    .promo-panel {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .login-panel {
        width: min(520px, 100%);
    }

    .brand-row {
        padding: 40px 40px 0;
    }

    .form-wrapper {
        margin-top: 40px;
        padding: 32px 40px 48px;
    }
}

@media (max-width: 640px) {
    .brand-row {
        padding: 28px 20px 0;
    }

    .form-wrapper {
        margin: 0;
        padding: 20px 20px 32px;
    }

    .field-group__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .submit-button,
    .social-button,
    .field-control input {
        min-height: 54px;
    }
}
