/* ============================================
   SUPER11 - login.css (Enhanced Mobile-First)
   Modern, responsive login page styling
   ============================================ */

:root {
    --primary: #912925;
    --accent: #b83732;
    --success: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    --warning: #ffb703;
    --danger: #ff6b6b;
    --dark: #912925;
    --darker: #8d2420;
    --light: #d6e0ff;
    --muted: #9fb0e6;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-dark: rgba(255, 255, 255, 0.05);
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)),
        url('../admin/images/bg-login.png') center center/cover no-repeat fixed !important;
    color: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Main Auth Container */
main.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    width: 100%;
}

.auth-wrapper {
    width: 100%;
    max-width: 380px;
    background: white;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s;
}

.auth-wrapper:hover::before {
    left: 100%;
}

/* Header Styles */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo i {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    font-weight: 400;
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #808080;
    border-radius: var(--radius);
    color: #000000;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(145, 41, 37, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #000000;
    font-weight: 400;
}

/* Password Toggle */
.password-toggle,
.password-toggle:active,
.password-toggle:focus {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #000000 !important;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all var(--transition);
    outline: none;
    box-shadow: none;
}

.password-toggle i {
    color: #000000 !important;
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Button Styles */
.auth-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(145, 41, 37, 0.3);
}

.auth-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;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(145, 41, 37, 0.4);
}

.auth-btn:active {
    transform: translateY(-1px);
}

.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Message Styles */
.auth-msg {
    margin: 0.5rem 0 1rem 0;
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    min-height: 20px;
    transition: all var(--transition);
    backdrop-filter: blur(10px);
}

.auth-msg.success {
    background: #0F974C;
    color: #ffffff;
    border: 1px solid #0F974C;
}

.auth-msg.error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.auth-msg.info {
    background: rgba(58, 134, 255, 0.1);
    color: var(--primary);
    border: 1px solid rgba(58, 134, 255, 0.3);
}

/* Links Section */
.auth-links {
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-links p {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.forgot-password,
.auth-link {
    color: #ff4757; /* Fallback color */
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password:hover,
.auth-link:hover {
    text-decoration: none;
    background: linear-gradient(135deg, #ff6348 0%, #ffa502 50%, #ff4757 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.forgot-password::after,
.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 50%, #ffa502 100%);
    transition: width 0.3s ease;
}

.forgot-password:hover::after,
.auth-link:hover::after {
    width: 100%;
}

.text-right {
    text-align: right;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #1a56db; /* Blue text color for modal content */
}

.modal-content h3 {
    color: #1a0dab; /* Darker blue for heading */
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: #1a56db; /* Blue for description text */
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.8rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--danger);
}

/* Message Styles */
.message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.trust-badge i {
    color: var(--success);
    font-size: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    main.auth-container {
        padding: 1rem 0.5rem;
        align-items: flex-start;
    }
    
    .auth-wrapper {
        padding: 2.5rem 1.5rem;
        margin: 1rem;
        border-radius: 12px;
    }
    
    .auth-header h2 {
        font-size: 1.8rem;
    }
    
    .auth-logo {
        font-size: 2rem;
    }
    
    .form-input {
        padding: 1.1rem 1.2rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .auth-btn {
        padding: 1.1rem 1.5rem;
        font-size: 1rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .trust-badge {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 2rem 1.2rem;
        margin: 0.5rem;
        border-radius: 10px;
    }
    
    .auth-header {
        margin-bottom: 2rem;
    }
    
    .auth-header h2 {
        font-size: 1.6rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
    
    .form-input {
        padding: 1rem 1.1rem;
    }
    
    .auth-btn {
        padding: 1rem 1.2rem;
        min-height: 52px; /* Better touch target */
    }
    
    .auth-links {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .password-toggle {
        right: 0.8rem;
        padding: 0.4rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .auth-wrapper {
        padding: 1.5rem 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.4rem;
    }
    
    .form-input {
        padding: 0.9rem 1rem;
    }
    
    .auth-btn {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .auth-wrapper {
        max-width: 400px;
        padding: 3rem 2.5rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .auth-wrapper {
        border-width: 0.5px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .auth-wrapper::before {
        display: none;
    }
}

/* Dark mode support (already dark, but for consistency) */
@media (prefers-color-scheme: dark) {
    .auth-wrapper {
        background: var(--glass);
    }
}

/* Focus styles for accessibility */
.form-input:focus-visible,
.auth-btn:focus-visible,
.auth-link:focus-visible {
    outline: 3px solid rgba(58, 134, 255, 0.5);
    outline-offset: 2px;
}

/* Loading state for form */
.form-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}