/* ============================================================ */
/* ===== LOGIN PAGE - Quasar Node ===== */
/* ============================================================ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin: 0;
    background: linear-gradient(145deg, #eef6ff 0%, #d9e8ff 100%);
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.login-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.brand-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding-right: 1rem;
}

.brand-left .brand-icon-lg {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 34px;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.25);
    margin-bottom: 0.3rem;
}

.brand-left .brand-title {
    font-weight: 800;
    font-size: 2.4rem;
    letter-spacing: -0.8px;
    color: #0b2559;
    line-height: 1.1;
}

.brand-left .brand-title span {
    color: #2563eb;
}

.brand-left .brand-subtitle {
    color: #5a7aa3;
    font-size: 1.05rem;
    font-weight: 500;
    max-width: 320px;
}

.brand-left .brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.brand-left .brand-features .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f3d6b;
    font-size: 0.9rem;
    font-weight: 500;
}

.brand-left .brand-features .feature-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.login-card {
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 2.5rem 2.5rem 2.2rem;
    box-shadow: 0 20px 60px rgba(18, 52, 106, 0.12), 0 8px 24px rgba(0, 20, 60, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.login-card:hover {
    box-shadow: 0 24px 72px rgba(18, 52, 106, 0.16);
}

.brand-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.brand-mobile .brand-icon {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.brand-mobile .brand-text {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    color: #0b2559;
}

.brand-mobile .brand-text span {
    color: #2563eb;
}

.welcome {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b1f44;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.welcome p {
    color: #5a7aa3;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-form {
    margin-top: 0.5rem;
}

.input-group {
    margin-bottom: 1.2rem;
    width: 100%;
}

.input-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1c3d66;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.input-group label i {
    margin-right: 8px;
    color: #2563eb;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    border-radius: 60px;
    border: 1.5px solid #d4e2ff;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #0b1f44;
    transition: 0.25s;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 20, 50, 0.02);
    font-family: 'Inter', sans-serif;
    -webkit-appearance: none;
    appearance: none;
}

.input-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 2px 8px rgba(0, 20, 50, 0.02);
}

.input-field::placeholder {
    color: #8aa3c9;
    font-weight: 400;
    font-size: 0.95rem;
}

.input-field.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .input-field {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #2563eb;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.2rem 0 1.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #3e5a7a;
    font-weight: 500;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}

.forgot-link {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.15s;
    border-bottom: 1.5px solid transparent;
}

.forgot-link:hover {
    border-bottom-color: #2563eb;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 60px;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.30);
    cursor: pointer;
    transition: 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.40);
}

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

.btn-login i {
    font-size: 1.1rem;
    transition: 0.2s;
}

.btn-login:hover i {
    transform: translateX(4px);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn-login .spinner-btn {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-login.loading .spinner-btn {
    display: block;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading i {
    display: none;
}

.signup-row {
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #3e5a7a;
}

.signup-row a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: 0.15s;
    margin-left: 6px;
}

.signup-row a:hover {
    border-bottom-color: #2563eb;
}

.error-message {
    display: none;
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    align-items: center;
    gap: 10px;
}

.error-message.show {
    display: flex;
}

.error-message i {
    font-size: 1rem;
    flex-shrink: 0;
}

.success-message {
    display: none;
    background: #dcfce7;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #86efac;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.success-message.show {
    display: flex;
}

.success-message i {
    flex-shrink: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copyright {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: #8aa3c9;
    letter-spacing: 0.2px;
}

.copyright i {
    margin-right: 4px;
}

@media (max-width: 820px) {
    .login-wrapper {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 420px;
    }
    .brand-left {
        display: none;
    }
    .brand-mobile {
        display: flex;
    }
    .login-card {
        padding: 2rem 1.8rem 2rem;
        border-radius: 28px;
    }
    .input-field {
        padding: 13px 16px;
        font-size: 0.98rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.8rem;
    }
    .login-card {
        padding: 1.5rem 1.2rem 1.8rem;
        border-radius: 24px;
        max-width: 100%;
    }
    .brand-mobile .brand-text {
        font-size: 1.4rem;
    }
    .brand-mobile .brand-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .welcome h2 {
        font-size: 1.3rem;
    }
    .welcome p {
        font-size: 0.85rem;
    }
    .input-group {
        margin-bottom: 1rem;
    }
    .input-group label {
        font-size: 0.8rem;
    }
    .input-field {
        padding: 12px 16px;
        font-size: 0.95rem;
        border-radius: 50px;
    }
    .password-wrapper .input-field {
        padding-right: 44px;
    }
    .password-toggle {
        right: 14px;
        font-size: 1rem;
    }
    .btn-login {
        padding: 14px;
        font-size: 0.95rem;
        border-radius: 50px;
    }
    .btn-login .spinner-btn {
        width: 20px;
        height: 20px;
        border-width: 2.5px;
    }
    .options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .remember-me {
        font-size: 0.8rem;
    }
    .forgot-link {
        font-size: 0.8rem;
    }
    .signup-row {
        font-size: 0.88rem;
        margin-top: 1.5rem;
    }
    .error-message,
    .success-message {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    .copyright {
        font-size: 0.65rem;
        margin-top: 1.2rem;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 1.2rem 0.8rem 1.5rem;
        border-radius: 20px;
    }
    .brand-mobile .brand-text {
        font-size: 1.2rem;
    }
    .brand-mobile .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        border-radius: 12px;
    }
    .welcome h2 {
        font-size: 1.1rem;
    }
    .welcome p {
        font-size: 0.8rem;
    }
    .input-field {
        padding: 10px 14px;
        font-size: 0.88rem;
    }
    .btn-login {
        padding: 12px;
        font-size: 0.88rem;
    }
    .btn-login .spinner-btn {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }
    .options-row {
        gap: 0.3rem;
    }
    .remember-me {
        font-size: 0.75rem;
    }
    .remember-me input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    .forgot-link {
        font-size: 0.75rem;
    }
    .signup-row {
        font-size: 0.82rem;
        margin-top: 1.2rem;
    }
    .error-message,
    .success-message {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

@media (min-width: 821px) {
    .brand-mobile {
        display: none !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    .input-field {
        font-size: 16px !important;
    }
    .btn-login {
        min-height: 52px;
    }
    .password-toggle {
        padding: 8px;
    }
}