:root {
    --cw-accent: #0ab5b5;
    --cw-accent-strong: #079a9a;
    --cw-accent-soft: rgba(10, 181, 181, 0.12);
    --cw-bg: #f2f5f9;
    --cw-surface: #ffffff;
    --cw-surface-muted: #f8fafc;
    --cw-border: #e2e8f0;
    --cw-border-strong: #cbd5e1;
    --cw-text: #0f172a;
    --cw-text-muted: #475569;
    --cw-text-soft: #64748b;
    --cw-navy: #102238;
    --cw-navy-2: #17364a;
    --cw-hero-teal: #0f4f56;
    --cw-hero-line: rgba(125, 211, 252, 0.16);
    --cw-green: #059669;
    --cw-amber: #d97706;
    --cw-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
    --cw-radius-lg: 28px;
    --cw-radius-md: 18px;
    --cw-radius-sm: 12px;
}

html,
body.cw-login-page {
    min-height: 100%;
}

body.cw-login-page {
    margin: 0;
    color: var(--cw-text);
    background: var(--cw-bg);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.cw-login-page *,
body.cw-login-page *::before,
body.cw-login-page *::after {
    box-sizing: border-box;
}

.cw-login-page a {
    color: var(--cw-accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.cw-login-page a:hover,
.cw-login-page a:focus {
    color: #087f7f;
    text-decoration: underline;
}

.cw-login-shell {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(560px, 720px) minmax(360px, 456px);
    justify-content: center;
    gap: 32px;
    align-items: center;
    padding: 32px;
    overflow: hidden;
}

.cw-login-shell::before,
.cw-login-shell::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.cw-login-shell::before {
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(10, 181, 181, 0.15), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, 0.11), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, #f2f5f9 46%, #edf4f7 100%);
}

.cw-login-shell::after {
    inset: 24px;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 32px;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.85), transparent 72%);
}

.cw-login-hero,
.cw-login-panel-wrap {
    position: relative;
    z-index: 1;
}

.cw-login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    max-width: 720px;
    min-height: min(640px, calc(100vh - 64px));
    justify-self: end;
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--cw-radius-lg);
    background:
        radial-gradient(circle at 84% 16%, rgba(10, 181, 181, 0.20), transparent 34%),
        radial-gradient(circle at 18% 92%, rgba(125, 211, 252, 0.10), transparent 30%),
        linear-gradient(137deg, var(--cw-navy) 0%, var(--cw-navy-2) 50%, var(--cw-hero-teal) 100%);
    color: #ffffff;
    box-shadow: var(--cw-shadow);
    overflow: hidden;
}

.cw-login-hero::before {
    content: "";
    position: absolute;
    inset: auto -96px -132px auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(125, 211, 252, 0.18);
    background: rgba(10, 181, 181, 0.055);
}

.cw-login-brand {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 44px;
}

.cw-login-brand-lockup {
    display: block;
    width: clamp(150px, 13vw, 190px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 26px rgba(2, 8, 23, 0.20));
}

.cw-login-logo-tile {
    width: 92px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 232, 240, 0.20);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 34px rgba(2, 8, 23, 0.18);
}

.cw-login-logo-tile img {
    width: 74px;
    height: auto;
    display: block;
}

.cw-login-brand-kicker {
    margin: 0 0 3px;
    color: rgba(226, 232, 240, 0.74);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cw-login-brand-name {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cw-login-hero h1 {
    position: relative;
    max-width: 560px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.cw-login-hero-copy {
    position: relative;
    max-width: 640px;
    margin: 22px 0 0;
    color: rgba(226, 232, 240, 0.90);
    font-size: clamp(15px, 1.4vw, 18px);
    line-height: 1.65;
}

.cw-login-proof {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 44px 0 0;
    padding: 0;
    list-style: none;
}

.cw-login-proof li {
    min-height: 112px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.cw-login-proof strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.cw-login-proof span {
    display: block;
    color: rgba(226, 232, 240, 0.76);
    font-size: 12px;
    line-height: 1.5;
}

.cw-login-status-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 42px;
}

.cw-login-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.075);
    font-size: 12px;
    font-weight: 700;
}

.cw-login-status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cw-accent);
    box-shadow: 0 0 0 4px rgba(10, 181, 181, 0.16);
}

.cw-login-panel-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(640px, calc(100vh - 64px));
}

.cw-login-card {
    width: min(100%, 456px);
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--cw-radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--cw-shadow);
}

.cw-login-card-header {
    margin-bottom: 28px;
}

.cw-login-card-eyebrow {
    margin: 0 0 10px;
    color: var(--cw-accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cw-login-card h2 {
    margin: 0;
    color: var(--cw-text);
    font-size: clamp(27px, 4vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.045em;
    font-weight: 800;
}

.cw-login-card-subtitle {
    margin: 12px 0 0;
    color: var(--cw-text-muted);
    font-size: 14px;
    line-height: 1.58;
}

.cw-login-form-group {
    margin-bottom: 18px;
}

.cw-login-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--cw-text);
    font-size: 13px;
    font-weight: 800;
}

.cw-login-input-shell {
    position: relative;
}

.cw-login-input-shell::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border-radius: 6px;
    background: var(--cw-accent-soft);
}

.cw-login-input-shell::after {
    content: "";
    position: absolute;
    left: 19px;
    top: 50%;
    width: 8px;
    height: 8px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: var(--cw-accent);
}

.cw-login-input-shell.cw-password::after {
    border-radius: 2px;
}

.cw-form-control.form-control {
    height: 48px;
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--cw-border);
    border-radius: var(--cw-radius-sm);
    background: var(--cw-surface-muted);
    color: var(--cw-text);
    box-shadow: none;
    font-size: 15px;
    font-weight: 600;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.cw-form-control.form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.cw-form-control.form-control:focus {
    border-color: var(--cw-accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 181, 181, 0.15);
    outline: none;
}

.cw-form-hint {
    margin: 8px 0 0;
    color: var(--cw-text-soft);
    font-size: 12px;
    line-height: 1.45;
}

.cw-login-actions {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 20px;
}

.cw-login-button.btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    background: var(--cw-accent);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(10, 181, 181, 0.24);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cw-login-button.btn:hover,
.cw-login-button.btn:focus {
    background: var(--cw-accent-strong);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(10, 181, 181, 0.28);
    outline: none;
    transform: translateY(-1px);
}

.cw-login-button.btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(10, 181, 181, 0.2), 0 16px 32px rgba(10, 181, 181, 0.28);
}

.cw-login-button.btn:active {
    transform: translateY(0);
}

.cw-login-secondary {
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--cw-border);
    color: var(--cw-text-muted);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.cw-login-legal {
    margin: 20px 0 0;
    color: var(--cw-text-soft);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

.cw-login-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
}

.cw-login-meta span {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid var(--cw-border);
    border-radius: 999px;
    color: var(--cw-text-soft);
    background: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.cw-login-page .swal2-popup {
    border-radius: 18px;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

.cw-login-page .swal2-title {
    color: var(--cw-text);
    font-weight: 800;
}

.cw-login-page .swal2-html-container {
    color: var(--cw-text-muted);
}

.cw-login-page .swal2-styled.swal2-confirm {
    border-radius: 12px !important;
    background-color: var(--cw-accent) !important;
    box-shadow: none !important;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .cw-login-shell {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .cw-login-hero,
    .cw-login-panel-wrap {
        min-height: auto;
    }

    .cw-login-hero {
        padding: 32px;
    }

    .cw-login-panel-wrap {
        align-items: stretch;
    }

    .cw-login-card {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .cw-login-shell {
        padding: 14px;
        gap: 14px;
    }

    .cw-login-shell::after {
        display: none;
    }

    .cw-login-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .cw-login-brand {
        margin-bottom: 28px;
    }

    .cw-login-proof {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .cw-login-proof li {
        min-height: auto;
    }

    .cw-login-status-row {
        margin-top: 28px;
    }

    .cw-login-card {
        padding: 26px 20px;
        border-radius: 22px;
    }
}

@media (max-width: 420px) {
    .cw-login-hero h1 {
        font-size: 32px;
    }

    .cw-login-logo-tile {
        width: 82px;
        height: 44px;
    }

    .cw-login-logo-tile img {
        width: 66px;
    }

    .cw-login-meta {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cw-login-page *,
    .cw-login-page *::before,
    .cw-login-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
