 *,
 *::before,
 *::after {
     box-sizing: border-box;
     margin: 0;
     padding: 0;
 }

 :root {
     --blue: #0F766E;
     --blue-light: #2DD4BF;
     --red: #7C3AED;
     --red-light: #A78BFA;
     --red-mid: #D32F2F;
     --red-dark: #6D28D9;
     --white: #FFFFFF;
 }

 html,
 body {
     height: 100%;
     font-family: 'Sora', sans-serif;
     overflow: hidden;
 }

 body {
     background: #0a0e1a;
     position: relative;
 }

 /* ── BACKGROUND ── */
 .bg-canvas {
     position: fixed;
     inset: 0;
     z-index: 0;
     background: linear-gradient(135deg, #1a0505 0%, #0a0e1a 50%, #0d1b3e 100%);
     overflow: hidden;
 }

 .bg-blob {
     position: absolute;
     border-radius: 50%;
     filter: blur(80px);
     opacity: 0.55;
     animation: blobFloat 8s ease-in-out infinite alternate;
 }

 .b1 {
     width: 520px;
     height: 520px;
     background: radial-gradient(circle, #7C3AED, #4C1D95);
     top: -120px;
     right: -120px;
     animation-duration: 9s;
 }

 .b2 {
     width: 420px;
     height: 420px;
     background: radial-gradient(circle, #0F766E, #115E59);
     bottom: -100px;
     left: -100px;
     animation-duration: 11s;
     animation-delay: -3s;
 }

 .b3 {
     width: 300px;
     height: 300px;
     background: radial-gradient(circle, #6D28D9, #7C3AED);
     bottom: 10%;
     right: 20%;
     animation-duration: 7s;
     animation-delay: -1.5s;
     opacity: 0.35;
 }

 .b4 {
     width: 250px;
     height: 250px;
     background: radial-gradient(circle, #134E4A, #0F766E);
     top: 20%;
     left: 15%;
     animation-duration: 10s;
     animation-delay: -5s;
     opacity: 0.30;
 }

 @keyframes blobFloat {
     0% {
         transform: translate(0, 0) scale(1)
     }

     100% {
         transform: translate(30px, 20px) scale(1.08)
     }
 }

 .grid-overlay {
     position: fixed;
     inset: 0;
     z-index: 1;
     pointer-events: none;
     background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
     background-size: 48px 48px;
 }

 .particles {
     position: fixed;
     inset: 0;
     z-index: 1;
     pointer-events: none;
     overflow: hidden; /* hạt trang trí không thò ra mép viewport (mobile) */
 }

 .particle {
     position: absolute;
     width: 4px;
     height: 4px;
     border-radius: 50%;
     animation: particleDrift linear infinite;
 }

 @keyframes particleDrift {
     0% {
         transform: translateY(100vh) rotate(0deg);
         opacity: 0;
     }

     10% {
         opacity: 1;
     }

     90% {
         opacity: 0.6;
     }

     100% {
         transform: translateY(-10vh) rotate(720deg);
         opacity: 0;
     }
 }

 /* ── LAYOUT ── */
 .page {
     position: relative;
     z-index: 10;
     min-height: 100vh;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 1rem;
 }

 .auth-wrapper {
     width: 100%;
     max-width: 460px;
 }

 .card {
     background: rgba(30, 10, 10, 0.65);
     backdrop-filter: blur(28px) saturate(1.5);
     -webkit-backdrop-filter: blur(28px) saturate(1.5);
     border: 1px solid rgba(255, 255, 255, 0.12);
     border-radius: 24px;
     padding: 2.8rem 2.4rem;
     box-shadow: 0 0 0 1px rgba(139, 124, 246, 0.25), 0 32px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
     animation: cardAppear 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
     position: relative;
 }

 @keyframes cardAppear {
     from {
         opacity: 0;
         transform: translateY(40px) scale(0.96)
     }

     to {
         opacity: 1;
         transform: translateY(0) scale(1)
     }
 }

 /* ── LOGO ── */
 .logo {
     display: flex;
     align-items: center;
     gap: 10px;
     justify-content: center;
     margin-bottom: 1.6rem;
 }

 .logo-icon {
     width: 42px;
     height: 42px;
     background: linear-gradient(135deg, var(--red), var(--blue));
     border-radius: 10px;
     display: flex;
     align-items: center;
     justify-content: center;
     box-shadow: 0 4px 20px rgba(139, 124, 246, 0.5), 0 2px 8px rgba(45, 212, 191, 0.4);
     animation: iconPulse 3s ease-in-out infinite;
     flex-shrink: 0;
 }

 @keyframes iconPulse {

     0%,
     100% {
         box-shadow: 0 4px 20px rgba(139, 124, 246, 0.5), 0 2px 8px rgba(45, 212, 191, 0.4);
     }

     50% {
         box-shadow: 0 4px 30px rgba(139, 124, 246, 0.8), 0 2px 12px rgba(45, 212, 191, 0.6);
     }
 }

 .logo-icon svg {
     width: 22px;
     height: 22px;
 }

 .logo-text {
     font-size: 1.45rem;
     font-weight: 800;
     letter-spacing: -0.02em;
     background: linear-gradient(90deg, var(--red-light) 0%, var(--white) 40%, var(--blue-light) 100%);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
     background-clip: text;
 }

 /* ── FORM TITLE ── */
 .form-title {
     font-size: 1.35rem;
     font-weight: 700;
     color: var(--white);
     margin-bottom: 0.25rem;
     letter-spacing: -0.02em;
     text-align: center;
 }

 .form-subtitle {
     font-size: 0.80rem;
     color: rgba(255, 255, 255, 0.45);
     margin-bottom: 1.5rem;
     line-height: 1.5;
     text-align: center;
 }

 /* ── FIELD ── */
 .field {
     margin-bottom: 1.1rem;
 }

 .field-label {
     display: block;
     font-size: 0.78rem;
     font-weight: 600;
     color: rgba(255, 255, 255, 0.55);
     margin-bottom: 0.42rem;
     letter-spacing: 0.04em;
     text-transform: uppercase;
 }

 .field-wrap {
     position: relative;
     display: flex;
     align-items: center;
 }

 .field-icon {
     position: absolute;
     left: 14px;
     width: 18px;
     height: 18px;
     color: rgba(255, 255, 255, 0.3);
     pointer-events: none;
     z-index: 2;
     transition: color 0.25s;
 }

 .field-wrap:focus-within .field-icon {
     color: var(--red-light);
 }

 .field input {
     width: 100%;
     background: rgba(255, 255, 255, 0.07);
     border: 1px solid rgba(255, 255, 255, 0.10);
     border-radius: 12px;
     padding: 0.78rem 1rem 0.78rem 2.8rem;
     color: var(--white);
     font-family: 'Sora', sans-serif;
     font-size: 0.9rem;
     outline: none;
     transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
 }

 .field input::placeholder {
     color: rgba(255, 255, 255, 0.22);
 }

 .field input:focus {
     border-color: var(--red);
     background: rgba(139, 124, 246, 0.10);
     box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.18);
 }

 .toggle-eye {
     position: absolute;
     right: 13px;
     background: none;
     border: none;
     cursor: pointer;
     color: rgba(255, 255, 255, 0.28);
     padding: 0;
     display: flex;
     align-items: center;
     transition: color 0.2s;
 }

 .toggle-eye:hover {
     color: rgba(255, 255, 255, 0.65);
 }

 /* ── FORGOT ── */
 .forgot {
     text-align: right;
     margin-top: -0.5rem;
     margin-bottom: 1.4rem;
 }

 .forgot a {
     font-size: 0.78rem;
     color: var(--red-light);
     text-decoration: none;
     transition: color 0.2s;
 }

 .forgot a:hover {
     color: var(--blue-light);
 }

 /* ── BUTTON ── */
 .btn-main {
     width: 100%;
     padding: 0.88rem;
     border: none;
     border-radius: 13px;
     cursor: pointer;
     font-family: 'Sora', sans-serif;
     font-size: 0.95rem;
     font-weight: 700;
     color: var(--white);
     letter-spacing: 0.02em;
     position: relative;
     overflow: hidden;
     transition: transform 0.18s, box-shadow 0.3s;
     margin-bottom: 1.4rem;
 }

 .btn-bg {
     position: absolute;
     inset: 0;
     background: linear-gradient(135deg, var(--red) 0%, var(--red-mid) 50%, var(--red-dark) 100%);
     transition: opacity 0.3s;
 }

 .btn-bg-hover {
     position: absolute;
     inset: 0;
     background: linear-gradient(135deg, var(--red-mid), var(--red-light));
     opacity: 0;
     transition: opacity 0.3s;
 }

 .btn-main:hover .btn-bg-hover {
     opacity: 1;
 }

 .btn-main:hover {
     transform: translateY(-2px);
     box-shadow: 0 8px 28px rgba(139, 124, 246, 0.45);
 }

 .btn-main:active {
     transform: scale(0.98);
 }

 .btn-label {
     position: relative;
     z-index: 2;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
 }

 .btn-spinner {
     display: none;
     width: 18px;
     height: 18px;
     border: 2.5px solid rgba(255, 255, 255, 0.35);
     border-top-color: var(--white);
     border-radius: 50%;
     animation: spin 0.7s linear infinite;
 }

 @keyframes spin {
     to {
         transform: rotate(360deg)
     }
 }

 .ripple {
     position: absolute;
     border-radius: 50%;
     background: rgba(255, 255, 255, 0.25);
     transform: scale(0);
     animation: rippleAnim 0.65s linear;
     pointer-events: none;
     z-index: 3;
 }

 @keyframes rippleAnim {
     to {
         transform: scale(4);
         opacity: 0
     }
 }

 /* ── DIVIDER & SOCIALS ── */
 .divider {
     display: flex;
     align-items: center;
     gap: 12px;
     margin-bottom: 1.2rem;
 }

 .divider::before,
 .divider::after {
     content: '';
     flex: 1;
     height: 1px;
     background: rgba(255, 255, 255, 0.10);
 }

 .divider span {
     font-size: 0.75rem;
     color: rgba(255, 255, 255, 0.30);
     white-space: nowrap;
 }

 .socials {
     display: flex;
     gap: 10px;
     margin-bottom: 1.5rem;
 }

 .btn-social {
     flex: 1;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 7px;
     background: rgba(255, 255, 255, 0.06);
     border: 1px solid rgba(255, 255, 255, 0.10);
     border-radius: 11px;
     padding: 0.6rem;
     color: rgba(255, 255, 255, 0.70);
     font-family: 'Sora', sans-serif;
     font-size: 0.8rem;
     font-weight: 600;
     cursor: pointer;
     transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
 }

 .btn-social:hover {
     background: rgba(255, 255, 255, 0.12);
     border-color: rgba(255, 255, 255, 0.22);
     color: var(--white);
     transform: translateY(-1px);
 }

 /* ── SWITCH LINK ── */
 .switch-text {
     text-align: center;
     font-size: 0.82rem;
     color: rgba(255, 255, 255, 0.40);
 }

 .switch-text a {
     color: var(--blue-light);
     text-decoration: none;
     font-weight: 600;
     transition: color 0.2s;
 }

 .switch-text a:hover {
     text-decoration: underline;
 }

 /* ── SUCCESS OVERLAY ── */
 .success-overlay {
     position: absolute;
     inset: 0;
     z-index: 20;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     background: rgba(30, 10, 10, 0.92);
     border-radius: 22px;
     opacity: 0;
     pointer-events: none;
     transition: opacity 0.4s;
 }

 .success-overlay.show {
     opacity: 1;
     pointer-events: all;
 }

 .check-circle {
     width: 72px;
     height: 72px;
     border-radius: 50%;
     background: linear-gradient(135deg, var(--red), var(--blue));
     display: flex;
     align-items: center;
     justify-content: center;
     margin-bottom: 1rem;
     box-shadow: 0 0 40px rgba(139, 124, 246, 0.5);
     animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
 }

 @keyframes checkPop {
     from {
         transform: scale(0) rotate(-90deg)
     }

     to {
         transform: scale(1) rotate(0)
     }
 }

 .check-circle svg {
     width: 34px;
     height: 34px;
 }

 .check-path {
     stroke-dasharray: 40;
     stroke-dashoffset: 40;
     animation: drawCheck 0.5s 0.3s ease forwards;
 }

 @keyframes drawCheck {
     to {
         stroke-dashoffset: 0
     }
 }

 .success-title {
     color: var(--white);
     font-size: 1.2rem;
     font-weight: 700;
     margin-bottom: 0.3rem;
 }

 .success-sub {
     color: rgba(255, 255, 255, 0.45);
     font-size: 0.82rem;
 }

 /* ── ERROR TOAST ── */
 .error-toast {
     position: absolute;
     bottom: 1.5rem;
     left: 50%;
     transform: translateX(-50%) translateY(20px);
     display: flex;
     align-items: center;
     gap: 8px;
     background: rgba(139, 124, 246, 0.90);
     color: var(--white);
     font-size: 0.82rem;
     font-weight: 600;
     padding: 0.65rem 1.1rem;
     border-radius: 10px;
     white-space: nowrap;
     opacity: 0;
     pointer-events: none;
     transition: opacity 0.3s, transform 0.3s;
     z-index: 30;
 }

 .error-toast.show {
     opacity: 1;
     transform: translateX(-50%) translateY(0);
 }

 /* ── FIELD INLINE ERRORS ── */
 .field-error {
     display: block;
     font-size: 0.75rem;
     color: #A78BFA;
     margin-top: 0.35rem;
     padding-left: 0.25rem;
     min-height: 0;
     line-height: 1.4;
 }

 .field.has-error .field-wrap {
     border-radius: 12px;
     box-shadow: 0 0 0 2px rgba(239, 83, 80, 0.45);
 }

 .field.has-error input {
     border-color: #A78BFA;
     background: rgba(239, 83, 80, 0.08);
 }
/* ── AUTH SPLIT LAYOUT (2026-07-09) ─────────────────────────────────────────
   HTML login/register đã chuyển sang layout 2 cột (.auth-split: form trái,
   brand canvas phải) nhưng CSS chưa được viết — card bung full-width và
   nội dung brand rớt xuống dưới dạng text thô. Block này dùng CHUNG cho
   login.css và register.css (giữ 2 bản đồng bộ). */

.auth-split {
    width: 100%;
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.auth-form-side {
    min-width: 0;
}

.auth-form-side .card {
    max-width: 460px;
    margin: 0 auto;
}

.auth-brand-side {
    min-width: 0;
}

.brand-canvas {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(10, 14, 30, 0.55);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    padding: 3.2rem 3rem;
    min-height: 540px;
    display: flex;
    align-items: center;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: cardAppear 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.12s both;
}

.brand-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.32;
    pointer-events: none;
}

.brand-glow--amber   { top: -80px;  right: -60px; background: #f59e0b; }
.brand-glow--indigo  { bottom: -100px; left: -80px; background: #6366f1; }
.brand-glow--emerald { top: 40%; left: 55%; background: #10b981; opacity: 0.2; }

.brand-canvas-content {
    position: relative;
    z-index: 1;
}

.brand-canvas-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.30);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 1.4rem;
}

.brand-canvas-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80;
    animation: brandDotPulse 2s ease-in-out infinite;
}

@keyframes brandDotPulse {
    50% { opacity: 0.35; }
}

.brand-canvas-title {
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.15;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 1rem;
}

.brand-canvas-grad {
    background: linear-gradient(90deg, #60a5fa, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-canvas-sub {
    color: rgba(226, 232, 240, 0.75);
    font-size: 0.98rem;
    line-height: 1.65;
    max-width: 46ch;
    margin: 0 0 2.2rem;
}

.brand-canvas-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 2.4rem;
    margin-bottom: 2.2rem;
}

.brand-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.brand-stat-lbl {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.6);
    margin-top: 2px;
}

.brand-canvas-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.brand-pill {
    font-size: 0.8rem;
    color: rgba(241, 245, 249, 0.85);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
}

/* Tablet/mobile: ẩn brand canvas, form về 1 cột giữa màn hình */
@media (max-width: 1023px) {
    .auth-split {
        grid-template-columns: minmax(0, 1fr);
        max-width: 520px;
    }
    .auth-brand-side {
        display: none;
    }
}
