/* ===== COMMON LOGIN STYLES ===== */
/* Shared styles for all login pages with consistent dimensions */

:root {
    /* Common dimensions */
    --login-card-width: 450px;
    --login-card-min-height: 600px;
    --login-icon-size: 80px;
    --login-padding: 2.5rem;
    
    /* Common spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    
    /* Common border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    
    /* Common shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 15px 35px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.3);
    
    /* Common transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Common typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--spacing-md);
}

/* ===== ANIMATED BACKGROUND ===== */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--login-card-width);
    margin: 0 auto;
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: var(--login-card-min-height);
    display: flex;
    flex-direction: column;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    z-index: 1;
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* ===== LOGIN HEADER ===== */
.login-header {
    text-align: center;
    padding: var(--login-padding) var(--login-padding) var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.login-icon {
    width: var(--login-icon-size);
    height: var(--login-icon-size);
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    animation: pulse-gentle 2s infinite;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.login-icon i {
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
}

.login-subtitle {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

/* ===== LOGIN FORM ===== */
.login-form {
    padding: 0 var(--login-padding) var(--login-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    background: rgba(255, 255, 255, 1);
}

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

/* ===== BUTTONS ===== */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-md);
}

.btn-login::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 var(--transition-slow);
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* ===== FOOTER LINKS ===== */
.login-footer {
    text-align: center;
    padding: var(--spacing-md) var(--login-padding);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(248, 250, 252, 0.8);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --login-card-width: 100%;
        --login-card-min-height: auto;
        --login-padding: 1.5rem;
        --login-icon-size: 70px;
    }
    
    body {
        padding: var(--spacing-sm);
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    :root {
        --login-padding: 1.25rem;
        --login-icon-size: 60px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
    }
    
    .btn-login {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
}
