/*=== Admin Login Styles ===*/

:root {
    --admin-primary: #2c3e50;
    --admin-secondary: #34495e;
    --admin-accent: #3498db;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-danger: #e74c3c;
    --admin-light: #ecf0f1;
    --admin-dark: #2c3e50;
    --admin-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--admin-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Animated Background */
.login-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -7s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 20%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
        opacity: 0.9;
    }
}

/* Login Form Container */
.login-form-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-heavy);
    position: relative;
    z-index: 10;
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.company-logo {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: var(--admin-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-medium);
    animation: pulse 2s infinite;
}

.company-logo i {
    font-size: 2rem;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.login-header h2 {
    color: var(--admin-dark);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

/* Security Notice */
.security-notice {
    border: none;
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--admin-accent);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Form Styling */
.login-form {
    margin-bottom: 30px;
}

.form-label {
    font-weight: 600;
    color: var(--admin-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-label i {
    color: var(--admin-accent);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    background: white;
    transform: translateY(-1px);
}

.form-control.is-valid {
    border-color: var(--admin-success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2327ae60' d='m2.3 6.73.7-.04 1.05-2.07 1.94-2.06.03-.88-.81-.02-1.38 1.96-1.76.8z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: var(--admin-danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 5.8 2.4 2.4M5.8 8.2l2.4-2.4'/%3e%3c/svg%3e");
}

/* Password Input Container */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--admin-accent);
}

/* Checkbox Styling */
.form-check-input {
    border: 2px solid #dee2e6;
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--admin-accent);
    border-color: var(--admin-accent);
}

.form-check-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Security Features */
.security-features {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.security-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #6c757d;
}

.security-item:last-child {
    margin-bottom: 0;
}

.security-item i {
    margin-right: 8px;
    width: 16px;
}

/* Login Button */
.login-btn {
    background: var(--admin-gradient);
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-spinner {
    display: inline-block !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Login Footer */
.login-footer {
    text-align: center;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.login-links a {
    color: var(--admin-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: var(--admin-dark);
    text-decoration: underline;
}

.login-links a i {
    color: #6c757d;
}

/* System Status */
.system-status {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 2s infinite;
}

.status-online {
    background: var(--admin-success);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.last-backup {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Demo Info */
.demo-info {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
    max-width: 280px;
    font-size: 0.85rem;
}

.demo-credentials h6 {
    color: var(--admin-dark);
    margin-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 5px;
}

.credential-item {
    margin-bottom: 5px;
    color: #6c757d;
}

.credential-item strong {
    color: var(--admin-dark);
}

/* Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: var(--shadow-heavy);
}

.modal-header {
    background: var(--admin-gradient);
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-title i {
    color: rgba(255, 255, 255, 0.8);
}

.help-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--admin-accent);
}

.help-section h6 {
    color: var(--admin-dark);
    margin-bottom: 10px;
}

.help-section ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.help-section li {
    color: #6c757d;
    margin-bottom: 5px;
}

/* Error Messages */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: var(--admin-danger);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid var(--admin-danger);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success Messages */
.success-message {
    background: rgba(39, 174, 96, 0.1);
    color: var(--admin-success);
    padding: 12px 15px;
    border-radius: 8px;
    border-left: 4px solid var(--admin-success);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--admin-accent);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-form-container {
        margin: 20px;
        padding: 30px 25px;
    }
    
    .company-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .company-logo i {
        font-size: 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .demo-info {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
        width: 100%;
        max-width: none;
    }
    
    .login-links {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .floating-shape {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-form-container {
        padding: 25px 20px;
    }
    
    .form-control {
        padding: 10px 12px;
    }
    
    .login-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .security-features,
    .system-status {
        padding: 12px;
    }
    
    .demo-info {
        padding: 15px;
        font-size: 0.8rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .security-notice,
    .help-section {
        border-left-width: 6px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .company-logo,
    .status-dot {
        animation: none;
    }
    
    .login-form-container {
        animation: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .demo-info,
    .floating-shape,
    .login-background {
        display: none;
    }
    
    .login-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
}