/**
 * Portal Authentication Stylesheet - Modern, High-End Event Experience
 * Designed for Đại hội Mường Thanh 2026 - Ninh Bình
 */

/* ==========================================================================
   Root Variables & Base Typography
   ========================================================================== */
:root {
    --auth-bg-dark: #080d1a;
    --auth-bg-surface: #0e1626;
    --auth-card-bg: rgba(255, 255, 255, 0.96);
    --auth-card-border: rgba(255, 255, 255, 0.7);
    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-primary-light: #60a5fa;
    --auth-primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --auth-success-gradient: linear-gradient(135deg, #10b981 0%, #047857 100%);
    --auth-accent-gold: #f59e0b;
    --auth-accent-purple: #8b5cf6;
    --auth-text-heading: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border-input: #cbd5e1;
    --auth-radius-card: 24px;
    --auth-radius-input: 14px;
    --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.portal-auth-body {
    font-family: var(--auth-font);
    background-color: var(--auth-bg-dark);
    color: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 85% 25%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, #090e1a 0%, #0d1527 100%);
    background-attachment: fixed;
}

/* ==========================================================================
   Ambient Backdrop Elements
   ========================================================================== */
.auth-ambient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    animation: orbFloat 18s ease-in-out infinite alternate;
}

.auth-ambient-orb.orb-1 {
    width: 480px;
    height: 480px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(37, 99, 235, 0) 70%);
}

.auth-ambient-orb.orb-2 {
    width: 420px;
    height: 420px;
    bottom: -100px;
    right: -80px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0) 70%);
    animation-delay: -6s;
}

.auth-ambient-orb.orb-3 {
    width: 360px;
    height: 360px;
    top: 40%;
    left: 45%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0) 70%);
    animation-delay: -12s;
}

.auth-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    pointer-events: none;
    z-index: 0;
}

@keyframes orbFloat {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.08); }
    100% { transform: translateY(20px) scale(0.95); }
}

.portal-auth-wrapper {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Left Column: Hero Branding Showcase
   ========================================================================== */
.portal-brand-showcase {
    padding: 1.5rem 1rem;
}

.portal-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35), 0 0 25px rgba(59, 130, 246, 0.25);
    margin-bottom: 1.75rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.portal-logo-wrapper:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.portal-logo-img {
    height: 96px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

.portal-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 50px;
    color: #93c5fd;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.portal-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
}

.portal-hero-title {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.portal-hero-title .text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 540px;
}

/* Destination Banner (When returning to /run or other features) */
.portal-destination-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(16, 185, 129, 0.18) 100%);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 18px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.portal-destination-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #10b981);
}

.destination-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.07em;
    color: #38bdf8;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.destination-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.65rem;
}

.destination-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.destination-chip {
    font-size: 0.78rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Feature Showcase Pills */
.portal-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.75rem;
}

.portal-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.portal-feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.portal-feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.portal-feature-icon.icon-blue {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.portal-feature-icon.icon-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.portal-feature-icon.icon-gold {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.portal-feature-text h6 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.portal-feature-text p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0;
}

/* ==========================================================================
   Right Column: The Authentication Card
   ========================================================================== */
.portal-auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: var(--auth-radius-card);
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 8px 24px -4px rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 2.25rem 2.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.portal-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #10b981, #8b5cf6);
}

/* Card Header */
.auth-card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-avatar-pill {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin: 0 auto 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    position: relative;
    box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-avatar-pill:hover {
    transform: scale(1.08) rotate(3deg);
}

.auth-avatar-pill.step-identify {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.auth-avatar-pill.step-setpin {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.35);
}

.auth-avatar-pill.step-login {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    box-shadow: 0 10px 25px -4px rgba(99, 102, 241, 0.35);
}

.auth-card-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--auth-text-heading);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-card-subtitle {
    font-size: 0.88rem;
    color: var(--auth-text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Step Progress Indicator Dots */
.auth-step-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.step-dot {
    width: 28px;
    height: 6px;
    border-radius: 6px;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--auth-primary);
    width: 42px;
}

.step-dot.completed {
    background: #10b981;
}

/* ==========================================================================
   Form Controls & Modern Input Styling
   ========================================================================== */
.auth-field-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: var(--auth-radius-input);
    background: #f8fafc;
    border: 2px solid var(--auth-border-input);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.auth-input-group:focus-within {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.auth-input-icon {
    display: flex;
    align-items: center;
    padding-left: 1.15rem;
    color: #64748b;
    font-size: 1.25rem;
}

.auth-text-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.85rem 0.85rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.06em;
    outline: none;
    text-transform: uppercase;
}

.auth-text-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
}

.auth-input-action-btn {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 4px;
    transition: color 0.2s ease;
}

.auth-input-action-btn:hover {
    color: var(--auth-primary);
}

.auth-field-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Primary Action Button */
.btn-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--auth-primary-gradient);
    border: none;
    border-radius: var(--auth-radius-input);
    box-shadow: 0 10px 24px -4px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.5);
    color: #ffffff;
}

.btn-auth-primary:active {
    transform: translateY(0);
}

.btn-auth-primary .btn-arrow-icon {
    transition: transform 0.25s ease;
}

.btn-auth-primary:hover .btn-arrow-icon {
    transform: translateX(4px);
}

.btn-auth-success {
    background: var(--auth-success-gradient);
    box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.4);
}

.btn-auth-success:hover {
    box-shadow: 0 14px 28px -4px rgba(16, 185, 129, 0.5);
    color: #ffffff;
}

/* Sleek Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 14px;
}

/* Secondary / QR Button */
.btn-auth-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--auth-radius-input);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth-qr:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    transform: translateY(-1px);
}

/* QR Camera Scanner Viewfinder */
.qr-scanner-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 18px;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.qr-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
}

#qr-reader {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

#qr-reader video {
    border-radius: 14px;
    object-fit: cover;
}

/* Animated laser scanning line effect */
.qr-scanner-viewport {
    position: relative;
}

.qr-scanner-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 12px #38bdf8;
    animation: qrLaserSweep 2.2s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 10;
}

@keyframes qrLaserSweep {
    0% { top: 15%; opacity: 0.3; }
    50% { opacity: 1; }
    100% { top: 85%; opacity: 0.3; }
}

/* ==========================================================================
   PIN / OTP 6-Digit Input Boxes
   ========================================================================== */
.pin-code-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0.85rem 0 1rem;
}

.pin-digit-box {
    width: 48px;
    height: 58px;
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    background-color: #f8fafc;
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    caret-color: var(--auth-primary);
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.pin-digit-box::-webkit-outer-spin-button,
.pin-digit-box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-digit-box:focus {
    outline: none;
    border-color: var(--auth-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.pin-digit-box.is-filled {
    border-color: #3b82f6;
    background-color: #ffffff;
}

.pin-toggle-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pin-toggle-btn:hover {
    color: var(--auth-primary);
    background: #e0f2fe;
    border-color: #bae6fd;
}

/* User Greeting Banner */
.auth-user-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.5rem;
}

.auth-user-banner.banner-success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.user-banner-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.auth-user-banner.banner-success .user-banner-avatar {
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.user-banner-text {
    flex: 1;
    min-width: 0;
}

.user-banner-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-banner-sub {
    font-size: 0.78rem;
    color: #64748b;
}

/* PIN Match Feedback Pill */
.pin-match-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 4px;
    transition: all 0.25s ease;
}

.pin-match-indicator.match {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.pin-match-indicator.mismatch {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Help Note Card */
.auth-help-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-top: 1.35rem;
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-help-card i {
    font-size: 1.1rem;
    color: #f59e0b;
    margin-top: 1px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 991.98px) {
    .portal-brand-showcase {
        text-align: center;
        padding: 0.5rem 0.5rem 0.75rem;
    }

    .portal-logo-wrapper {
        padding: 8px 16px;
        border-radius: 16px;
        margin-bottom: 0.75rem;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }

    .portal-logo-img {
        height: 52px;
    }

    .portal-hero-title {
        font-size: 1.4rem;
        line-height: 1.25;
    }

    .portal-event-badge {
        font-size: 0.72rem;
        padding: 4px 10px;
    }

    .portal-destination-banner {
        text-align: left;
        padding: 0.75rem 0.95rem;
        border-radius: 14px;
        margin-bottom: 0.85rem;
    }

    .destination-name {
        font-size: 0.95rem;
        margin-bottom: 0;
    }

    .portal-feature-list {
        display: none; /* Hide long features on mobile to keep focus on card */
    }

    .portal-auth-card {
        padding: 1.65rem 1.35rem;
        border-radius: 20px;
        box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.35);
    }

    .auth-card-title {
        font-size: 1.35rem;
    }

    .auth-avatar-pill {
        width: 54px;
        height: 54px;
        font-size: 1.45rem;
        border-radius: 16px;
        margin-bottom: 0.85rem;
    }
}

@media (max-width: 480px) {
    .portal-auth-card {
        padding: 1.35rem 1rem;
        border-radius: 18px;
    }

    .auth-text-input {
        font-size: 1.05rem;
        padding: 0.75rem 0.5rem;
    }

    .pin-code-group {
        gap: 6px !important;
    }

    .pin-digit-box {
        width: 42px;
        height: 50px;
        font-size: 1.4rem;
        border-radius: 11px;
    }

    .auth-card-title {
        font-size: 1.25rem;
    }

    .auth-card-subtitle {
        font-size: 0.82rem;
    }

    .portal-hero-title {
        font-size: 1.25rem;
    }

    .portal-logo-img {
        height: 46px;
    }
}

@media (max-width: 360px) {
    .pin-code-group {
        gap: 4px !important;
    }

    .pin-digit-box {
        width: 36px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 9px;
    }
}

/* ===== Select2 - Dropdown chọn đơn vị khớp giao diện auth ===== */
.auth-input-group .select2-container {
    flex: 1;
    min-width: 0;
}

.auth-input-group .select2-container .select2-selection--single {
    height: auto;
    min-height: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
}

.auth-input-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    padding: 0;
}

.auth-input-group .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.auth-input-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.75rem;
}

.auth-input-group .select2-container--open .select2-selection--single,
.auth-input-group .select2-container--focus .select2-selection--single {
    outline: none;
}

.select2-dropdown {
    border: 2px solid var(--auth-primary);
    border-radius: var(--auth-radius-input);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.select2-container--default .select2-results__option {
    color: #0f172a;
    font-weight: 500;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--auth-primary);
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #e2e8f0;
    color: #0f172a;
}

.select2-search--dropdown .select2-search__field {
    border: 2px solid var(--auth-border-input);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    outline: none;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--auth-primary);
}
