:root {
    --auth-ink: #0f2338;
    --auth-muted: #5b7188;
    --auth-border: #d7e3ef;
    --auth-surface: #ffffff;
    --auth-brand: #0f6d5f;
    --auth-accent: #e78e2f;
}

body.auth-layout {
    min-height: 100vh;
    color: var(--auth-ink);
}

.auth-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 16px 36px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 28px rgba(15, 35, 56, 0.08);
    padding: 10px 14px;
    backdrop-filter: blur(4px);
}

.auth-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.auth-brand-logo,
.auth-brand-fallback {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
}

.auth-brand-logo {
    object-fit: cover;
    border: 1px solid #d8e4ef;
    background: #fff;
}

.auth-brand-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8d9e8;
    background: linear-gradient(140deg, #eff6ff, #ecfff5);
    font-weight: 800;
    color: #244a66;
}

.auth-brand-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.auth-brand-subtitle {
    margin-top: 1px;
    font-size: 0.79rem;
    color: var(--auth-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 560px;
}

.auth-shell {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 14px;
}

.auth-info,
.auth-card {
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 15px 32px rgba(15, 35, 56, 0.08);
}

.auth-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #cbe0f2;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1e4a66;
    background: #f4f8fd;
    width: max-content;
}

.auth-info h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2.5vw, 2.2rem);
    line-height: 1.18;
    font-weight: 800;
}

.auth-info p {
    margin: 0;
    color: var(--auth-muted);
}

.auth-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.auth-point {
    border: 1px solid #d8e5f2;
    border-radius: 12px;
    padding: 10px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.auth-point strong {
    display: block;
    font-size: 0.84rem;
}

.auth-point span {
    display: block;
    font-size: 0.77rem;
    color: #60778f;
    margin-top: 3px;
}

.auth-card {
    padding: 20px;
}

.auth-card h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 800;
}

.auth-card .subtitle {
    margin-top: 4px;
    color: var(--auth-muted);
    font-size: 0.87rem;
}

.auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.82rem;
}

.auth-actions-row a {
    color: #235274;
    text-decoration: none;
    font-weight: 700;
}

.auth-actions-row a:hover,
.auth-actions-row a:focus {
    text-decoration: underline;
}

.auth-divider {
    height: 1px;
    background: #e1e9f2;
    margin: 12px 0;
}

.auth-help {
    font-size: 0.8rem;
    color: #587086;
}

.plan-mini-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.plan-mini-item {
    border: 1px solid #d6e4f1;
    border-radius: 12px;
    background: #f8fbff;
    padding: 9px;
}

.plan-mini-item .plan-name {
    font-size: 0.82rem;
    font-weight: 800;
}

.plan-mini-item .plan-price {
    font-size: 0.9rem;
    font-weight: 800;
    margin-top: 4px;
}

.plan-mini-item .plan-price span {
    font-weight: 600;
    font-size: 0.72rem;
    color: #617a91;
}

.auth-debug-box {
    border: 1px dashed #d4e2ef;
    border-radius: 12px;
    background: #f8fbff;
    padding: 10px;
    font-size: 0.75rem;
    color: #5e778f;
}

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-points,
    .plan-mini-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .auth-wrap {
        padding: 12px 10px 28px;
    }

    .auth-topbar {
        padding: 10px;
    }

    .auth-card,
    .auth-info {
        padding: 15px;
        border-radius: 15px;
    }

    .auth-brand-subtitle {
        max-width: 190px;
    }
}
