:root {
    --color-navy-primary: #16324f;
    --color-teal-accent: #1fa6a8;
    --color-teal-light: #58c7c9;
    --color-white: #ffffff;
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
}

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--color-navy-primary);
    background:
        radial-gradient(circle at top left, rgba(88, 199, 201, 0.28), transparent 34%),
        radial-gradient(circle at right center, rgba(31, 166, 168, 0.18), transparent 26%),
        linear-gradient(180deg, #f4fbfb 0%, #eef5fa 46%, #ffffff 100%);
}

.app-shell {
    min-height: 100vh;
}

.auth-shell {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding: 24px;
}

.auth-shell::before,
.auth-shell::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(8px);
}

.auth-shell::before {
    top: -80px;
    left: -100px;
    width: 240px;
    height: 240px;
    background: rgba(31, 166, 168, 0.18);
}

.auth-shell::after {
    right: -120px;
    bottom: -120px;
    width: 280px;
    height: 280px;
    background: rgba(22, 50, 79, 0.12);
}

.auth-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 24px;
    align-items: stretch;
    max-width: 1120px;
    margin: 0 auto;
}

.auth-panel,
.auth-hero {
    border: 1px solid rgba(22, 50, 79, 0.08);
    border-radius: 28px;
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 70px rgba(22, 50, 79, 0.12);
}

.auth-hero {
    position: relative;
    display: none;
    overflow: hidden;
    padding: 40px;
    color: var(--color-white);
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(135deg, #16324f 0%, #1c4d71 52%, #1fa6a8 100%);
}

.auth-hero::after {
    content: '';
    position: absolute;
    inset: auto -50px -80px auto;
    width: 240px;
    height: 240px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(28deg);
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.auth-hero-badge {
    width: fit-content;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 0.83rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
}

.auth-hero h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.35rem);
    line-height: 1.02;
    font-weight: 700;
}

.auth-hero p,
.auth-feature-item p {
    margin: 0;
    max-width: 30rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    line-height: 1.7;
}

.auth-quote {
    display: grid;
    gap: 10px;
    margin-top: 10px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-quote-text {
    margin: 0;
    color: var(--color-white);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
}

.auth-quote-author {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

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

.auth-feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.auth-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.1rem;
}

.auth-panel {
    padding: 24px;
    background: rgba(255, 255, 255, 0.88);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-brand img {
    height: 44px;
    width: auto;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(31, 166, 168, 0.16), rgba(22, 50, 79, 0.08));
}

.auth-brand-mark img {
    height: 40px;
}

.auth-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-brand-subtitle {
    color: rgba(22, 50, 79, 0.66);
    font-size: 0.92rem;
}

.auth-header {
    margin-bottom: 24px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--color-teal-accent);
    font-size: 0.87rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-header h1 {
    margin: 0;
    color: var(--color-navy-primary);
    font-size: clamp(2rem, 5vw, 2.7rem);
    line-height: 1.05;
}

.auth-header p {
    margin: 12px 0 0;
    color: rgba(22, 50, 79, 0.7);
    line-height: 1.7;
}

.form-stack {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 9px;
}

.form-label {
    color: var(--color-navy-primary);
    font-size: 0.94rem;
    font-weight: 600;
}

.form-control-wrap {
    position: relative;
}

.form-control-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    pointer-events: none;
    color: rgba(22, 50, 79, 0.46);
    font-size: 1rem;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.form-control {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 56px;
    padding: 14px 16px 14px 48px;
    border: 1px solid rgba(22, 50, 79, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-navy-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-control::placeholder {
    color: rgba(22, 50, 79, 0.42);
}

.form-control:focus {
    outline: none;
    border-color: rgba(31, 166, 168, 0.9);
    box-shadow: 0 0 0 4px rgba(31, 166, 168, 0.14);
    transform: translateY(-1px);
}

.form-control-wrap:focus-within .form-control-icon {
    color: var(--color-teal-accent);
}

.form-control:not(:placeholder-shown) + .form-control-icon,
.form-control:-webkit-autofill + .form-control-icon {
    color: rgba(22, 50, 79, 0.62);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-navy-primary);
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.94) inset;
    transition: background-color 9999s ease-out 0s;
}

#username {
    text-transform: uppercase;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(22, 50, 79, 0.78);
    font-size: 0.95rem;
}

.form-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-teal-accent);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 60px;
    padding: 16px 20px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #16324f 0%, #1fa6a8 100%);
    color: var(--color-white);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 18px 32px rgba(31, 166, 168, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px rgba(31, 166, 168, 0.28);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus {
    outline: none;
    box-shadow:
        0 22px 38px rgba(31, 166, 168, 0.28),
        0 0 0 4px rgba(31, 166, 168, 0.18);
}

.auth-footer-note {
    margin-top: 20px;
    color: rgba(22, 50, 79, 0.62);
    font-size: 0.92rem;
    line-height: 1.65;
    text-align: center;
}

.auth-footer-note a {
    color: var(--color-teal-accent);
    font-weight: 700;
    text-decoration: none;
}

.auth-footer-note a:hover {
    color: var(--color-navy-primary);
    text-decoration: underline;
}

.alert-error {
    display: grid;
    gap: 6px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(173, 48, 67, 0.16);
    border-radius: 18px;
    color: #8a2134;
    background: rgba(252, 236, 239, 0.92);
}

.field-error {
    color: #8a2134;
    font-size: 0.88rem;
    font-weight: 600;
}

.muted-link {
    color: var(--color-teal-accent);
    font-weight: 600;
    text-decoration: none;
}

.muted-link:hover {
    color: var(--color-navy-primary);
}

@media (min-width: 960px) {
    .auth-shell {
        padding: 36px;
    }

    .auth-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(420px, 480px);
        gap: 32px;
    }

    .auth-hero {
        display: flex;
        align-items: stretch;
        min-height: 720px;
    }

    .auth-panel {
        padding: 40px;
    }
}
