/* ================================================================
   CROWN Login Page Styles
   ================================================================ */

.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--crown-bg);
}

/* ================================================================
   HERO PANEL (LEFT)
   ================================================================ */
.login-hero {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #312e81 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Decorative elements */
.login-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-pulse 6s ease-in-out infinite;
}

.login-hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: hero-pulse 8s ease-in-out infinite reverse;
}

@keyframes hero-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Floating grid pattern */
.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

/* Brand */
.hero-brand {
    margin-bottom: 2rem;
}

.hero-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-logo-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-product-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: 3px;
    line-height: 1;
}

.hero-product-desc {
    font-size: 0.9375rem;
    color: rgba(148, 163, 184, 0.9);
    font-weight: 400;
    line-height: 1.6;
}

.hero-slogan {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 300;
    font-style: italic;
    margin-bottom: 2.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--crown-accent);
}

/* Feature list */
.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.hero-features .feature-check {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--crown-success);
    flex-shrink: 0;
}

.hero-developed-by {
    font-size: 0.8125rem;
    color: rgba(148, 163, 184, 0.5);
    font-weight: 400;
}

.hero-developed-by span {
    color: rgba(148, 163, 184, 0.8);
    font-weight: 500;
}

/* ================================================================
   LOGIN FORM PANEL (RIGHT)
   ================================================================ */
.login-form-panel {
    width: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: white;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.login-form-header {
    margin-bottom: 2rem;
}

.login-form-header h1 {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--crown-text-primary);
    margin: 0 0 0.5rem;
}

.login-form-header p {
    font-size: var(--font-size-base);
    color: var(--crown-text-secondary);
    margin: 0;
}

/* Form elements */
.login-form .crown-form-group {
    margin-bottom: 1.25rem;
}

.login-form .crown-form-input {
    padding: 0.75rem 0.875rem;
    font-size: var(--font-size-base);
    border: 1.5px solid var(--crown-border);
    border-radius: var(--radius-md);
}

.login-form .input-icon-wrapper .crown-form-input {
    padding-left: 2.75rem;
}

.login-form .input-icon-wrapper .input-icon {
    left: 1rem;
}

/* Remember + Forgot */
.login-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--crown-accent);
    cursor: pointer;
}

.remember-me span {
    font-size: var(--font-size-sm);
    color: var(--crown-text-secondary);
    user-select: none;
}

.forgot-password {
    font-size: var(--font-size-sm);
    color: var(--crown-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-password:hover {
    color: var(--crown-accent-hover);
    text-decoration: underline;
}

/* Submit button */
.login-submit-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: var(--font-size-md);
    font-weight: 600;
    background: var(--crown-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-submit-btn:hover:not(:disabled) {
    background: var(--crown-accent-hover);
    box-shadow: 0 4px 16px var(--crown-accent-glow);
    transform: translateY(-1px);
}

.login-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-submit-btn.loading {
    pointer-events: none;
    position: relative;
}

.login-submit-btn.loading .btn-text {
    visibility: hidden;
}

.login-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: crown-spin 0.6s linear infinite;
}

/* Login error */
.login-error {
    background: var(--crown-danger-light);
    color: var(--crown-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: crown-fadeIn 0.3s ease;
}

.login-success {
    background: var(--crown-success-light);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile brand (hidden on desktop) */
.login-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 2rem;
}

.login-mobile-brand .brand-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.login-mobile-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    color: var(--crown-text-primary);
}

.login-mobile-brand p {
    font-size: var(--font-size-xs);
    color: var(--crown-text-muted);
    margin: 0.25rem 0 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 991.98px) {
    .login-hero {
        display: none;
    }

    .login-form-panel {
        width: 100%;
        min-height: 100vh;
    }

    .login-mobile-brand {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .login-form-panel {
        padding: 2rem 1.5rem;
    }
}
