/* ============================================ */
/* ROOT VARIABLES - PURPLE-PINK THEME */
/* ============================================ */
:root {
    --primary: #667eea;
    --primary-hover: #764ba2;
    --primary-light: #f093fb;
    --primary-dark: #4a148c;
    --secondary: #9c27b0;
    --secondary-hover: #7b1fa2;
    --success: #16a34a;
    --success-hover: #15803d;
    --success-light: #86efac;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fca5a5;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-light: #fcd34d;
    --info: #8b5cf6;
    --info-hover: #7c3aed;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --dark: #1a1a2e;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
    --brand-max-height: 76px;
    --logo-lg-height: 52px;
    --logo-sm-height: 42px;
    --nav-bg-start: #0a0e2a;
    --nav-bg-end: #161b4a;
    --nav-hover-bg: rgba(255, 255, 255, 0.08);
    --nav-active-bg: rgba(255, 255, 255, 0.12);
    --nav-border-color: rgba(255, 255, 255, 0.06);
    --content-top-gap: 12px;
    /* Validation Colors - Bright & Visible */
    --error-bg: rgba(251, 146, 60, 0.15);
    --error-border: #fb923c;
    --error-text: #fdba74;
    --error-icon: #fb923c;
}

/* ============================================ */
/* FONTS & BASE */
/* ============================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
    background: linear-gradient(
        135deg,
        #0a0e2a 0%,
        #1a1b4a 30%,
        #2d1b69 60%,
        #1a0e2e 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* ============================================ */
/* ANIMATED BACKGROUND */
/* ============================================ */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 0%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(102, 126, 234, 0.12),
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(240, 147, 251, 0.1),
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 80%,
            rgba(139, 92, 246, 0.08),
            transparent 40%
        ),
        radial-gradient(
            circle at 70% 20%,
            rgba(99, 102, 241, 0.06),
            transparent 40%
        );
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 15s ease-in-out infinite alternate;
}

@keyframes orbFloat {
    0% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        transform: scale(1.05) rotate(2deg);
    }
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================ */
/* MAIN CONTAINER - COMPACT */
/* ============================================ */
.login-container {
    width: 100%;
    max-width: 880px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    min-height: 460px;
    z-index: 1;
    position: relative;
}

/* ============================================ */
/* BRAND SECTION - CENTERED CONTENT */
/* ============================================ */
.login-brand {
    background: linear-gradient(
        160deg,
        #1a0033 0%,
        #4a148c 40%,
        #7b1fa2 70%,
        #9c27b0 100%
    );
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 20% 30%,
            rgba(102, 126, 234, 0.15),
            transparent 60%
        ),
        radial-gradient(
            ellipse at 80% 70%,
            rgba(240, 147, 251, 0.1),
            transparent 50%
        ),
        radial-gradient(
            ellipse at 50% 50%,
            rgba(139, 92, 246, 0.08),
            transparent 70%
        );
    pointer-events: none;
}

.login-brand .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    animation: orbPulse 8s ease-in-out infinite;
}

.login-brand .orb:nth-child(1) {
    width: 200px;
    height: 200px;
    background: #667eea;
    top: -80px;
    right: -60px;
    animation-delay: 0s;
}

.login-brand .orb:nth-child(2) {
    width: 150px;
    height: 150px;
    background: #f093fb;
    bottom: -50px;
    left: -50px;
    animation-delay: 3s;
}

.login-brand .orb:nth-child(3) {
    width: 120px;
    height: 120px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 5s;
    opacity: 0.12;
}

@keyframes orbPulse {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-10px, -8px) scale(1.1);
    }
    66% {
        transform: translate(8px, 10px) scale(0.9);
    }
}

.brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Logo - Centered */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    width: 100%;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea, #f093fb);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    position: relative;
    flex-shrink: 0;
}

.logo-icon::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.3),
        rgba(240, 147, 251, 0.3)
    );
    z-index: -1;
    filter: blur(6px);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 30%, #c4b5fd 60%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo-text span {
    background: linear-gradient(135deg, #a78bfa, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.tagline {
    color: rgba(255, 255, 255, 0.35);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

/* Features - Centered */
.features {
    display: grid;
    gap: 5px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(4px);
}

.feature .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #f093fb);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

/* ============================================ */
/* FORM SECTION - COMPACT */
/* ============================================ */
.login-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 32px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.form-header {
    margin-bottom: 24px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.form-header p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    font-weight: 400;
}

/* ============================================ */
/* FORM FIELDS - COMPACT */
/* ============================================ */
.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.field .wrap {
    position: relative;
}

.field .wrap .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.25);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.field input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 42px;
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-size: 12px;
}

.field input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 3px rgba(102, 126, 234, 0.08),
        inset 0 0 0 1px rgba(102, 126, 234, 0.15);
}

.field input:focus + .icon,
.field input:focus ~ .icon {
    color: #667eea;
}

/* ============================================ */
/* VALIDATION ERRORS - BRIGHT ORANGE/YELLOW */
/* ============================================ */
.field input.is-invalid {
    border-color: #fb923c;
    background: rgba(251, 146, 60, 0.06);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.08);
}

.field input.is-valid {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.06);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}

.field .error {
    color: #fdba74;
    font-size: 11px;
    margin-top: 4px;
    display: none;
    font-weight: 500;
    background: rgba(251, 146, 60, 0.12);
    padding: 5px 12px;
    border-radius: 6px;
    border-left: 3px solid #fb923c;
    animation: slideDown 0.3s ease;
}

.field .error.show {
    display: block;
}

/* Error message for email structure */
#emailStructureError {
    color: #fdba74;
    background: rgba(251, 146, 60, 0.12);
    border-left-color: #fb923c;
}

/* Empty field errors */
#emailEmptyError,
#passwordEmptyError {
    color: #fdba74;
    background: rgba(251, 146, 60, 0.12);
    border-left-color: #fb923c;
}

/* Error icon - optional */
.field .error::before {
    content: "⚠ ";
    font-size: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.field .toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.field .toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

/* ============================================ */
/* OPTIONS ROW - COMPACT */
/* ============================================ */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 2px;
}

.options .remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s ease;
}

.options .remember:hover {
    color: rgba(255, 255, 255, 0.7);
}

.options .remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #667eea;
    cursor: pointer;
    border-radius: 3px;
}

.options .forgot {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.options .forgot:hover {
    color: #667eea;
}

/* ============================================ */
/* LOGIN BUTTON - COMPACT */
/* ============================================ */
.btn-login {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    letter-spacing: 0.3px;
    animation: gradientMove 3s ease-in-out infinite alternate;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.2);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading .text {
    visibility: hidden;
}

.btn-login.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2.5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================ */
/* DIVIDER & SOCIAL - COMPACT */
/* ============================================ */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 16px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.social {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.social button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    place-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.social button:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.1);
    color: #ffffff;
}

.social button:active {
    transform: translateY(0) scale(0.95);
}

/* ============================================ */
/* RESPONSIVE - MOBILE OPTIMIZED */
/* ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        min-height: auto;
        border-radius: 20px;
    }

    .login-brand {
        padding: 24px 24px;
        min-height: 140px;
    }

    .login-brand .features {
        display: none;
    }

    .login-brand .orb:nth-child(1) {
        width: 160px;
        height: 160px;
        top: -60px;
        right: -50px;
    }

    .login-brand .orb:nth-child(2) {
        width: 120px;
        height: 120px;
        bottom: -30px;
        left: -30px;
    }

    .login-brand .orb:nth-child(3) {
        width: 100px;
        height: 100px;
    }

    .login-form {
        padding: 24px 24px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .logo-text {
        font-size: 20px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .form-header p {
        font-size: 12px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 30px;
    }

    .login-container {
        border-radius: 16px;
        max-width: 100%;
        min-height: auto;
    }

    .login-brand {
        padding: 18px 16px;
        min-height: 100px;
    }

    .login-brand .orb:nth-child(1) {
        width: 120px;
        height: 120px;
        top: -40px;
        right: -30px;
    }

    .login-brand .orb:nth-child(2) {
        width: 100px;
        height: 100px;
        bottom: -20px;
        left: -20px;
    }

    .login-brand .orb:nth-child(3) {
        width: 80px;
        height: 80px;
        display: none;
    }

    .login-form {
        padding: 18px 16px;
    }

    .logo {
        gap: 8px;
        margin-bottom: 8px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
        border-radius: 10px;
    }

    .logo-text {
        font-size: 18px;
    }

    .tagline {
        font-size: 9px;
        margin-bottom: 14px;
        letter-spacing: 1px;
    }

    .form-header {
        margin-bottom: 18px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 12px;
    }

    .field {
        margin-bottom: 12px;
    }

    .field label {
        font-size: 9px;
        margin-bottom: 3px;
    }

    .field input {
        padding: 8px 10px 8px 34px;
        font-size: 12px;
        border-radius: 8px;
        height: 38px;
    }

    .field .wrap .icon {
        left: 10px;
        font-size: 12px;
    }

    .field .error {
        font-size: 10px;
        padding: 4px 10px;
    }

    .field .toggle {
        right: 8px;
        font-size: 12px;
        padding: 3px;
    }

    .options {
        margin-bottom: 16px;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .options .remember {
        font-size: 11px;
    }

    .options .remember input[type="checkbox"] {
        width: 13px;
        height: 13px;
    }

    .options .forgot {
        font-size: 11px;
    }

    .btn-login {
        padding: 9px;
        font-size: 13px;
        border-radius: 8px;
        min-height: 38px;
    }

    .btn-login.loading::after {
        width: 18px;
        height: 18px;
        margin: -9px 0 0 -9px;
    }

    .divider {
        margin: 14px 0 12px;
        font-size: 9px;
        gap: 10px;
    }

    .social {
        gap: 6px;
    }

    .social button {
        width: 34px;
        height: 34px;
        font-size: 12px;
        border-radius: 8px;
    }
}

/* Extra Small */
@media (max-width: 400px) {
    body {
        padding: 6px;
        padding-top: 20px;
    }

    .login-container {
        border-radius: 12px;
    }

    .login-brand {
        padding: 14px 12px;
        min-height: 80px;
    }

    .login-brand .orb:nth-child(1) {
        width: 100px;
        height: 100px;
        top: -30px;
        right: -20px;
        filter: blur(60px);
    }

    .login-brand .orb:nth-child(2) {
        width: 80px;
        height: 80px;
        bottom: -15px;
        left: -15px;
        filter: blur(60px);
    }

    .login-form {
        padding: 14px 12px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
        border-radius: 8px;
    }

    .logo-text {
        font-size: 16px;
    }

    .tagline {
        font-size: 8px;
        margin-bottom: 10px;
    }

    .form-header h2 {
        font-size: 18px;
    }

    .form-header p {
        font-size: 11px;
    }

    .field input {
        padding: 7px 8px 7px 30px;
        font-size: 11px;
        border-radius: 6px;
        height: 34px;
    }

    .field .wrap .icon {
        left: 8px;
        font-size: 11px;
    }

    .field .error {
        font-size: 9px;
        padding: 3px 8px;
    }

    .btn-login {
        padding: 8px;
        font-size: 12px;
        min-height: 34px;
        border-radius: 6px;
    }

    .btn-login.loading::after {
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
        border-width: 2px;
    }

    .social button {
        width: 30px;
        height: 30px;
        font-size: 11px;
        border-radius: 6px;
    }

    .options .remember {
        font-size: 10px;
    }
}

/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */

/* Hide validation feedback from Laravel */
.invalid-feedback,
.invalid-feedback.d-block {
    display: none !important;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: #667eea;
    color: #ffffff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
}
