:root {
    --text: #18313f;
    --text-strong: #10232d;
    --muted: #657b86;
    --page: #eaf4f1;
    --grid: rgba(39, 92, 101, 0.08);
    --surface: #ffffff;
    --line: #c9d9d8;
    --teal: #27666d;
    --teal-dark: #1d5159;
    --blue: #2d6cdf;
    --blue-dark: #1f4faf;
    --gold: #f2c84b;
    --coral: #d95f45;
    --coral-soft: #ffe9e3;
    --radius: 8px;
    --radius-sm: 5px;
    --shadow: 0 24px 60px rgba(33, 71, 78, 0.16);
}

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

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

body {
    background:
        linear-gradient(90deg, var(--grid) 1px, transparent 1px),
        linear-gradient(180deg, var(--grid) 1px, transparent 1px),
        var(--page);
    background-size: 30px 30px;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(360px, 460px);
    width: min(1120px, calc(100% - 48px));
    min-height: 640px;
    margin: 6vh auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-cover {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(135deg, #2b7678 0%, #2d876f 54%, #d86a4f 100%);
    background-size: 34px 34px, 34px 34px, auto;
    color: #ffffff;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 13px;
}

.brand-sign {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: var(--radius);
    background: var(--gold);
    color: #17333a;
    font-size: 1.25rem;
    font-weight: 950;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-weight: 950;
}

.brand-lockup small {
    color: #ecfffb;
    font-size: 0.78rem;
    font-weight: 850;
}

.eyebrow,
.form-head span,
.input-group label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.login-cover .eyebrow {
    color: #fff7d7;
}

.login-cover h1 {
    max-width: 520px;
    margin-top: 8px;
    font-size: 3.2rem;
    font-weight: 950;
    line-height: 1.02;
}

.login-card {
    display: grid;
    align-content: center;
    padding: 44px;
}

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

.form-head h2 {
    margin-top: 6px;
    color: var(--text-strong);
    font-size: 1.8rem;
    font-weight: 950;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 7px;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45, 108, 223, 0.14);
}

button {
    width: 100%;
    min-height: 46px;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    background: var(--blue);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

button:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
    transform: translateY(-1px);
}

.error {
    margin-bottom: 16px;
    padding: 11px 12px;
    border: 1px solid #ffbeb0;
    border-radius: var(--radius-sm);
    background: var(--coral-soft);
    color: var(--coral);
    font-size: 0.9rem;
    font-weight: 900;
}

@media (max-width: 820px) {
    .login-shell {
        grid-template-columns: 1fr;
        width: min(100% - 28px, 520px);
        min-height: 0;
        margin: 24px auto;
    }

    .login-cover {
        min-height: 260px;
    }

    .login-cover h1 {
        font-size: 2.2rem;
    }

    .login-card {
        padding: 30px;
    }
}
