/**
 * Quinnus Login Page Styles
 * Modern design with CSS abstract pill and tablet shapes
 * Theme consistent with landing page
 */

/* ==========================================================================
   CSS Variables (Same as landing page)
   ========================================================================== */
:root {
    --primary-color: #0049C6;
    --primary-dark: #003699;
    --primary-light: #458FFF;
    --secondary-color: #219653;
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
    --bg-light: #f8faff;
    --bg-section: #EBF5FF;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-page {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-section) 50%, #f8faff 100%);
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

/* ==========================================================================
   Pill & Tablet Decorations
   ========================================================================== */
.pill-decorations {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Elongated Pills */
.pill {
    position: absolute;
    border-radius: 100px;
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.pill-1 {
    width: 180px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    top: 10%;
    left: -50px;
    transform: rotate(-25deg);
    animation-delay: 0s;
}

.pill-2 {
    width: 120px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), #4ade80);
    top: 60%;
    right: -30px;
    transform: rotate(35deg);
    animation-delay: -5s;
}

.pill-3 {
    width: 100px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    bottom: 15%;
    left: 5%;
    transform: rotate(-15deg);
    animation-delay: -10s;
}

.pill-4 {
    width: 150px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light), #93c5fd);
    top: 25%;
    right: 10%;
    transform: rotate(20deg);
    animation-delay: -7s;
    opacity: 0.1;
}

/* Circular Tablets */
.tablet {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    animation: float-reverse 25s ease-in-out infinite;
}

.tablet-1 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 30% 30%, var(--primary-light), var(--primary-color));
    top: 5%;
    right: 15%;
    animation-delay: -3s;
}

.tablet-2 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #fb7185, #e11d48);
    bottom: 25%;
    right: 25%;
    animation-delay: -8s;
}

.tablet-3 {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #a78bfa, #7c3aed);
    top: 45%;
    left: 3%;
    animation-delay: -12s;
}

.tablet-4 {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, var(--secondary-color), #16a34a);
    bottom: 10%;
    left: 15%;
    animation-delay: -15s;
}

/* Two-tone Capsules */
.capsule {
    position: absolute;
    width: 120px;
    height: 50px;
    border-radius: 100px;
    opacity: 0.18;
    animation: float 22s ease-in-out infinite;
    overflow: hidden;
}

.capsule::before,
.capsule::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

.capsule::before {
    left: 0;
}

.capsule::after {
    right: 0;
}

.capsule-1 {
    top: 35%;
    right: 5%;
    transform: rotate(-30deg);
    animation-delay: -4s;
}

.capsule-1::before {
    background: var(--primary-color);
}

.capsule-1::after {
    background: #fff;
    opacity: 0.8;
}

.capsule-2 {
    bottom: 5%;
    right: 40%;
    transform: rotate(15deg);
    animation-delay: -9s;
}

.capsule-2::before {
    background: #e11d48;
}

.capsule-2::after {
    background: #fef2f2;
}

.capsule-3 {
    top: 70%;
    left: -20px;
    transform: rotate(-45deg);
    animation-delay: -14s;
}

.capsule-3::before {
    background: var(--secondary-color);
}

.capsule-3::after {
    background: #f0fdf4;
}

/* Float Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotation, 0deg));
    }

    25% {
        transform: translateY(-20px) rotate(calc(var(--rotation, 0deg) + 5deg));
    }

    50% {
        transform: translateY(-10px) rotate(calc(var(--rotation, 0deg) - 3deg));
    }

    75% {
        transform: translateY(-25px) rotate(calc(var(--rotation, 0deg) + 2deg));
    }
}

@keyframes float-reverse {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    25% {
        transform: translateY(15px) scale(1.05);
    }

    50% {
        transform: translateY(5px) scale(0.98);
    }

    75% {
        transform: translateY(20px) scale(1.02);
    }
}

/* ==========================================================================
   Login Container
   ========================================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    display: flex;
    max-width: 1100px;
    width: 100%;
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 73, 198, 0.15),
        0 0 0 1px rgba(0, 73, 198, 0.05);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ==========================================================================
   Left Side - Branding
   ========================================================================== */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Decorative elements on branding side */
.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

.login-branding::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.branding-content {
    position: relative;
    z-index: 1;
    color: white;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    color: white !important;
}

.brand-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature-item i {
    color: #4ade80;
    font-size: 1rem;
}

/* ==========================================================================
   Right Side - Login Form
   ========================================================================== */
.login-form-container {
    flex: 1;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.login-logo {
    height: 60px;
    width: auto;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label-modern {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s ease;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 73, 198, 0.1);
}

.form-control-modern:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

.form-control-modern::placeholder {
    color: #9ca3af;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
}

.forgot-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-login-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 73, 198, 0.3);
    position: relative;
    overflow: hidden;
}

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

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

.btn-login-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 73, 198, 0.4);
}

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

.btn-login-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.btn-login-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-login-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.register-prompt {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.register-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */
.modal-modern {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.modal-modern .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 1.5rem;
}

.modal-modern .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modal-modern .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-modern .btn-close:hover {
    opacity: 1;
}

.modal-modern .modal-body {
    padding: 2rem;
}

.modal-modern .modal-footer {
    border: none;
    padding: 1rem 2rem 2rem;
    gap: 1rem;
}

.btn-modal-primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 73, 198, 0.3);
}

.btn-modal-secondary {
    padding: 0.75rem 2rem;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    color: var(--text-dark);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-secondary:hover {
    background: #e5e7eb;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 991px) {
    .login-branding {
        display: none;
    }

    .login-wrapper {
        max-width: 480px;
    }

    .login-form-container {
        padding: 3rem 2rem;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }

    .login-wrapper {
        border-radius: 24px;
    }

    .login-form-container {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .form-control-modern {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
    }

    .btn-login-primary,
    .btn-login-secondary {
        padding: 0.875rem;
    }

    /* Hide some decorations on mobile */
    .pill-3,
    .pill-4,
    .tablet-3,
    .capsule-2,
    .capsule-3 {
        display: none;
    }
}

/* ==========================================================================
   Notification Overrides
   ========================================================================== */
.bootstrap-notify-container {
    z-index: 9999 !important;
}