:root {
    --brand: #2ca4c6;
    --brand-dark: #087d9d;
    --brand-soft: #dff3f8;
    --complement-1: #ebbe78;
    --complement-2: #b4d2af;
    --ink: #1b1d1f;
    --muted: #73787d;
    --paper: #ffffff;
    --surface: rgba(255, 255, 255, 0.88);
    --border: rgba(44, 164, 198, 0.22);
    --danger: #b42318;
    --success: #067647;
    --warning: #9a6700;
    --shadow: 0 28px 70px rgba(18, 72, 88, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Exo 2', 'Segoe UI', Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 78% 20%, rgba(180, 210, 175, 0.24) 0, rgba(180, 210, 175, 0) 30%),
        linear-gradient(140deg, #ffffff 0%, #f8fcfd 45%, #eef9fb 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    width: 48vw;
    height: 36vw;
    pointer-events: none;
    opacity: 0.55;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg width='720' height='520' viewBox='0 0 720 520' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%232ca4c6' stroke-width='2'%3E%3Cpath opacity='.9' d='M1 86C86-8 151 77 242 32c57-28 113-68 185-9 45 36 96 39 148 12 45-23 94-23 144 6'/%3E%3Cpath opacity='.65' d='M0 140c87-94 153-9 244-54 57-28 113-68 185-9 45 36 96 39 148 12 45-23 94-23 144 6'/%3E%3Cpath opacity='.42' d='M0 194c87-94 153-9 244-54 57-28 113-68 185-9 45 36 96 39 148 12 45-23 94-23 144 6'/%3E%3Cpath opacity='.25' d='M0 248c87-94 153-9 244-54 57-28 113-68 185-9 45 36 96 39 148 12 45-23 94-23 144 6'/%3E%3C/g%3E%3C/svg%3E");
}

body::before {
    top: -5vw;
    left: -8vw;
}

body::after {
    right: -8vw;
    bottom: -8vw;
    transform: rotate(180deg);
}

.page-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.brand-rail {
    position: fixed;
    left: 56px;
    top: 50%;
    display: flex;
    align-items: center;
    gap: 30px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    font-size: 12px;
}

.brand-rail::before,
.brand-rail::after {
    content: '';
    width: 86px;
    height: 1px;
    background: var(--brand);
    opacity: .75;
}

.brand-rail-pill {
    border: 2px solid var(--brand);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .8);
}

.access-card {
    position: relative;
    width: min(100%, 520px);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 34px;
    backdrop-filter: blur(14px);
}

.card-accent {
    position: absolute;
    inset: 0 0 auto 0;
    height: 10px;
    background: linear-gradient(90deg, var(--complement-1), var(--brand), var(--complement-2));
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 30px;
}

.brand-logo {
    display: block;
    width: min(260px, 62vw);
    height: auto;
}

.brand-badge {
    white-space: nowrap;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(44, 164, 198, 0.10);
    border: 1px solid rgba(44, 164, 198, 0.20);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.title-block {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: clamp(30px, 5vw, 42px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.muted,
.hint {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

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

label {
    color: var(--ink);
    font-weight: 800;
    font-size: 14px;
}

input[type="password"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(44, 164, 198, 0.26);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-size: 16px;
    outline: none;
}

input[type="password"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 5px rgba(44, 164, 198, 0.14);
}

.btn,
.gate-button {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}

.btn-primary {
    min-height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 16px 28px rgba(44, 164, 198, 0.24);
}

.btn-primary:hover,
.gate-button:hover {
    transform: translateY(-2px);
}

.gate-button {
    position: relative;
    width: 100%;
    min-height: 178px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, var(--brand), #0d8daa 62%, var(--brand-dark));
    color: #ffffff;
    box-shadow: 0 22px 40px rgba(44, 164, 198, 0.34);
    margin: 18px 0;
}

.gate-button::before {
    content: '';
    position: absolute;
    inset: auto -20% -55% -20%;
    height: 110px;
    z-index: -1;
    background: linear-gradient(90deg, rgba(235, 190, 120, .68), rgba(180, 210, 175, .72));
    filter: blur(18px);
    transform: rotate(-4deg);
}

.gate-button:disabled,
.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.gate-button-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 25px;
    font-weight: 900;
}

.gate-button-title {
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.gate-button-subtitle {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: .92;
}

.status-box,
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 16px;
    padding: 14px 15px;
    font-size: 14px;
    line-height: 1.45;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
}

.status-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 5px rgba(44, 164, 198, 0.14);
}

.alert-error,
.status-error {
    color: var(--danger);
    background: #fff4f2;
    border-color: #fecdca;
}

.status-error .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(180, 35, 24, 0.12);
}

.status-success {
    color: var(--success);
    background: #ecfdf3;
    border-color: #abefc6;
}

.status-success .status-dot {
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(6, 118, 71, 0.12);
}

.status-loading {
    color: var(--brand-dark);
    background: var(--brand-soft);
    border-color: rgba(44, 164, 198, 0.26);
}

.status-loading .status-dot {
    background: var(--complement-1);
    box-shadow: 0 0 0 5px rgba(235, 190, 120, 0.22);
}

.details {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(44, 164, 198, 0.20);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(44, 164, 198, .06), rgba(180, 210, 175, .06));
    word-break: break-word;
}

.details-label {
    display: block;
    margin-bottom: 5px;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .11em;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    color: var(--brand-dark);
    text-decoration: none;
    font-weight: 900;
}

.logout-link:hover {
    text-decoration: underline;
}

code {
    background: rgba(44, 164, 198, 0.10);
    border-radius: 7px;
    padding: 2px 7px;
    color: var(--brand-dark);
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

@media (max-width: 900px) {
    .brand-rail {
        display: none;
    }
}

@media (max-width: 560px) {
    body::before,
    body::after {
        width: 92vw;
        height: 66vw;
    }

    .page-shell {
        padding: 16px;
        align-items: stretch;
    }

    .access-card {
        margin: auto 0;
        padding: 26px 22px 24px;
        border-radius: 24px;
    }

    .brand-header {
        display: grid;
        justify-items: start;
        gap: 14px;
        margin-bottom: 24px;
    }

    .brand-logo {
        width: min(250px, 72vw);
    }

    .gate-button {
        min-height: 154px;
        border-radius: 24px;
    }

    .gate-button-title {
        font-size: 29px;
    }
}

input[type="text"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(44, 164, 198, 0.26);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-size: 16px;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 5px rgba(44, 164, 198, 0.14);
}

.logged-user {
    margin: -6px 0 14px;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(44, 164, 198, .08);
    color: var(--brand-dark);
    font-size: 13px;
}

.logged-user span {
    color: var(--muted);
}
