/* =============================================
   Modern Authentication UI - Portal
   Clean, professional login/access design
   ============================================= */

/* Global Auth Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-body {
    font-family: 'Cairo', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.95;
}

/* Floating Shapes */
.shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    animation: float 15s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: white;
    border-radius: 50%;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    bottom: 10%;
    left: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    top: 20%;
    left: 15%;
    animation-delay: 4s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: white;
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    bottom: -100px;
    right: 15%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-40px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) rotate(3deg);
    }
}

/* Main Content */
.auth-main {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-icon i {
    font-size: 36px;
    color: white;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: #718096;
    margin: 0;
}

/* Login Form */
.login-form {
    margin-bottom: 24px;
}

/* Modern Form Groups */
.form-group-modern {
    margin-bottom: 24px;
}

.form-label-modern {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.form-label-modern i {
    font-size: 16px;
    opacity: 0.7;
}

/* Modern Input Fields */
.form-control-modern {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    color: #2d3748;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control-modern:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-control-modern.has-value {
    background: white;
    border-color: #48bb78;
}

.form-control-modern::placeholder {
    color: #a0aec0;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Validation Messages */
.validation-message {
    display: block;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* Modern Alert */
.alert-modern {
    border-radius: 12px;
    border: none;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-modern i {
    font-size: 18px;
}

/* Modern Checkbox */
.form-check-modern {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.form-check-input-modern {
    display: none;
}

.form-check-label-modern {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.checkmark i {
    font-size: 12px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-check-input-modern:checked + .form-check-label-modern .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.form-check-input-modern:checked + .form-check-label-modern .checkmark i {
    opacity: 1;
}

.form-check-label-modern:hover .checkmark {
    border-color: #667eea;
}

/* Modern Buttons */
.btn-modern {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    pointer-events: none;
}

.btn-ripple.ripple-active {
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Login Footer */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

.login-footer i {
    margin-left: 4px;
    color: #48bb78;
}

/* Access Denied Styles */
.access-denied-container {
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.6s ease-out;
}

.access-denied-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.access-denied-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    box-shadow: 0 10px 30px rgba(245, 101, 101, 0.4);
}

.access-denied-icon i {
    font-size: 48px;
    color: white;
}

.access-denied-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
}

.access-denied-message {
    font-size: 16px;
    color: #718096;
    margin-bottom: 32px;
    line-height: 1.6;
}

.access-denied-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-secondary-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-card,
    .access-denied-card {
        padding: 32px 24px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .access-denied-title {
        font-size: 26px;
    }
    
    .login-icon {
        width: 64px;
        height: 64px;
    }
    
    .login-icon i {
        font-size: 28px;
    }
}

/* Loading State */
.btn-modern.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-modern.loading .btn-text::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin-right: 8px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
