:root {
    --auth-primary: #136fe6;
    --auth-primary-dark: #0f4fb9;
    --auth-secondary: #ff7a1a;
    --auth-text: #123a7a;
    --auth-muted: #5b6b84;
    --auth-border: #d8e1ee;
    --auth-shadow: 0 20px 48px rgba(14, 30, 71, 0.12);
    --auth-card-bg: rgba(255, 255, 255, 0.94);
}

* {
    box-sizing: border-box;
}

body.auth-modern {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1e293b;
    background-color: #edf1f6;
    background-image:
        linear-gradient(rgba(255,255,255,0.18), rgba(255,255,255,0.18)),
        url('img/auth-bg-template.png');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: top center;
}

.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 84px;
}

.auth-panel {
    width: 100%;
    max-width: 560px;
    background: var(--auth-card-bg);
    border-radius: 28px;
    box-shadow: var(--auth-shadow);
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
    padding: 36px 32px 28px;
}

.auth-panel.auth-panel-wide {
    max-width: 960px;
}

.auth-icon-badge {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
    box-shadow: 0 12px 28px rgba(19, 111, 230, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 34px;
}

.auth-title {
    margin: 0;
    text-align: center;
    color: var(--auth-text);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.auth-subtitle {
    margin: 8px 0 0;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-divider {
    position: relative;
    height: 1px;
    background: #dce3ec;
    margin: 24px 0 30px;
}

.auth-divider::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38px;
    height: 3px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: var(--auth-secondary);
}

.auth-alert {
    border-radius: 16px;
    border: 1px solid #f5c2c7;
}

.auth-label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #1f2937;
}

.auth-input-group {
    display: flex;
    align-items: center;
    min-height: 54px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input-group:focus-within {
    border-color: rgba(19, 111, 230, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(19,111,230,0.12);
}

.auth-input-icon,
.auth-input-action {
    width: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b99ad;
    font-size: 18px;
}

.auth-input {
    border: 0;
    outline: 0;
    box-shadow: none !important;
    padding: 14px 4px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    color: #1f2937;
    background: transparent;
}

.auth-input::placeholder {
    color: #a0acbc;
}

button.auth-input-action {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.auth-btn-primary,
.auth-btn-secondary {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    border: 0;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--auth-primary) 0%, #1d7bff 100%);
    box-shadow: 0 14px 28px rgba(19,111,230,0.22);
}

.auth-btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
}

.auth-btn-secondary {
    color: var(--auth-primary);
    background: #fff;
    border: 1px solid rgba(19,111,230,0.36);
}

.auth-footer-note {
    margin-top: 18px;
    text-align: center;
    color: #627085;
    font-size: 12px;
    line-height: 1.65;
}

.auth-footer-note i {
    color: var(--auth-primary);
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

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

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

.role-option {
    width: 100%;
    min-height: 122px;
    border: 1px solid var(--auth-border);
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    text-align: left;
    padding: 18px 18px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.role-option:hover,
.role-option:focus {
    border-color: rgba(19, 111, 230, 0.45);
    box-shadow: 0 14px 26px rgba(19,111,230,0.10);
    transform: translateY(-1px);
    outline: none;
}

.role-option-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.role-option-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    background: linear-gradient(180deg, rgba(19,111,230,0.08) 0%, rgba(255,122,26,0.06) 100%);
    color: var(--auth-primary);
}

.role-option-title {
    margin: 0;
    color: var(--auth-text);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.25px;
}

.role-option-subtitle {
    margin: 0;
    color: #7b8798;
    font-size: 12px;
    line-height: 1.55;
}

.role-option-desc {
    color: #4c5c72;
    font-size: 14px;
    line-height: 1.6;
}

.auth-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.auth-actions .btn {
    min-width: 172px;
    padding-left: 18px;
    padding-right: 18px;
}

@media (max-width: 991.98px) {
    body.auth-modern {
        background-size: cover;
        background-position: center;
    }

    .auth-panel.auth-panel-wide {
        max-width: 760px;
    }
}

@media (max-width: 767.98px) {
    .auth-layout {
        padding: 24px 14px 70px;
    }

    .auth-panel {
        padding: 28px 20px 24px;
        border-radius: 22px;
    }

    .auth-title {
        font-size: 24px;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

    .auth-actions .btn {
        width: 100%;
        min-width: 0;
    }
}
