/* ============================================
   LOVEWORLD ERP - AUTH.CSS
   Beautiful Dark Theme Login Page
   ============================================ */

/* ============================================
   ROOT & VARIABLES
   ============================================ */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Dark Theme */
    --auth-bg: #0f172a;
    --auth-surface: #1e293b;
    --auth-elevated: #334155;
    --auth-border: #475569;
    
    /* Text */
    --auth-text: #f1f5f9;
    --auth-text-secondary: #cbd5e1;
    --auth-text-muted: #94a3b8;
    
    /* Gradients */
    --auth-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

/* ============================================
   BODY & CONTAINER
   ============================================ */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--auth-gradient);
    z-index: -1;
}

/* Animated Shapes */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: -1;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ============================================
   AUTH CONTAINER
   ============================================ */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.auth-box {
    width: 100%;
    max-width: 480px;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   CARD
   ============================================ */
.auth-container .card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 24px;
    padding: 0;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(59, 130, 246, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container .card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(59, 130, 246, 0.15);
}

/* ============================================
   AUTH HEADER
   ============================================ */
.auth-header {
    text-align: center;
    padding: 48px 40px 32px;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.auth-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--auth-text-secondary);
    margin: 0 0 4px 0;
}

.auth-powered {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* ============================================
   AUTH BODY
   ============================================ */
.auth-body {
    padding: 40px;
}

/* ============================================
   ALERTS
   ============================================ */
.auth-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.auth-alert i {
    font-size: 18px;
}

/* ============================================
   FORM
   ============================================ */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-text);
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    color: var(--auth-text);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: var(--auth-text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-control:hover {
    border-color: rgba(71, 85, 105, 0.8);
}

/* ============================================
   AUTH BUTTON
   ============================================ */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:hover::before {
    width: 300px;
    height: 300px;
}

.auth-btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.auth-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

.auth-btn.primary:active {
    transform: translateY(0);
}

.auth-btn i {
    font-size: 18px;
    position: relative;
    z-index: 1;
}

.auth-btn span {
    position: relative;
    z-index: 1;
}

/* Loading State */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   AUTH FOOTER
   ============================================ */
.auth-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    text-align: center;
}

.auth-footer-text {
    margin: 0;
    font-size: 14px;
    color: var(--auth-text-secondary);
}

.auth-footer-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 576px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-header {
        padding: 32px 24px 24px;
    }
    
    .auth-logo {
        width: 80px;
        height: 80px;
    }
    
    .auth-title {
        font-size: 26px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .auth-body {
        padding: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .auth-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .auth-header {
        padding: 24px 20px 20px;
    }
    
    .auth-logo {
        width: 70px;
        height: 70px;
    }
    
    .auth-title {
        font-size: 24px;
    }
    
    .auth-body {
        padding: 20px;
    }
}

/* ============================================
   ADDITIONAL UTILITIES
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--auth-text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(71, 85, 105, 0.3);
}

.auth-divider::before {
    margin-right: 12px;
}

.auth-divider::after {
    margin-left: 12px;
}

/* Remember Me Checkbox */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.auth-checkbox label {
    font-size: 14px;
    color: var(--auth-text-secondary);
    cursor: pointer;
    margin: 0;
}

/* Forgot Password Link */
.forgot-password {
    text-align: right;
    margin-top: -16px;
    margin-bottom: 24px;
}

.forgot-password a {
    font-size: 13px;
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body::before,
    body::after,
    .auth-logo {
        display: none;
    }
    
    .auth-container {
        padding: 0;
    }
    
    .auth-container .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}