/* Admin Login Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0f0f0f;
    --secondary-bg: #1a1a1a;
    --accent-color: #9333ea;
    --accent-hover: #7e22ce;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --success-color: #10b981;
    --error-color: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, var(--primary-bg) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.15) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: float 20s ease-in-out infinite;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(180deg); }
}

.login-container {
    width: 100%;
    max-width: 440px;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 90px;
    height: 90px;
    margin-bottom: 1.5rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(147, 51, 234, 0.3));
}

.logo-section h1 {
    color: var(--text-primary);
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.show {
    display: flex;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.1rem 1rem 3.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.input-wrapper input:focus ~ i {
    color: var(--accent-color);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.btn-login {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.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 0.5s ease;
}

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

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(147, 51, 234, 0.4);
}

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

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.back-link:hover {
    color: var(--accent-color);
    background: rgba(147, 51, 234, 0.1);
}

@media (max-width: 1024px) {
    body {
        padding: 3rem 1.5rem;
    }

    body::before,
    body::after {
        opacity: 0.6;
        filter: blur(2px);
    }
}

@media (max-width: 768px) {
    body {
        padding: 2rem 1.25rem 3rem;
        align-items: flex-start;
        min-height: 100vh;
    }

    .login-container {
        max-width: 520px;
    }

    .login-card {
        padding: 2.5rem 2rem;
        border-radius: 20px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    }

    .logo-section {
        margin-bottom: 1.5rem;
    }

    .logo-section h1 {
        font-size: 1.65rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1.5rem 1rem 4.5rem;
        align-items: flex-start;
    }

    .login-container {
        margin-top: 0.5rem;
    }

    .login-card {
        padding: 2.2rem 1.6rem;
        background: rgba(12, 12, 12, 0.85);
        border-radius: 18px;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .btn-login {
        margin-top: 1.5rem;
        font-size: 0.95rem;
    }

    .footer {
        margin-top: 1.25rem;
        padding-top: 1.2rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.4rem;
    }

    .logo-section h1 {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        font-size: 0.9rem;
        padding: 0.95rem 1rem 0.95rem 3rem;
    }

    .back-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    body {
        padding: 1.25rem 0.75rem 3.5rem;
    }

    .login-card {
        padding: 1.75rem 1.2rem;
        border-radius: 16px;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .logo-section h1 {
        font-size: 1.35rem;
    }
}
