/* ========================================
   Modern Admin Login Page Styles
   Brand Colors: White & #C60C29
   ======================================== */

:root {
    --primary-color: #C60C29;
    --primary-dark: #a00a21;
    --primary-light: #e8324d;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

body, html {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   Animated Background
   ======================================== */
.login-body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--gray-100) 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ff6b7a 100%);
    bottom: -100px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.2;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ========================================
   Login Card
   ======================================== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow-2xl), 0 0 0 1px rgba(0, 0, 0, 0.03);
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

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

/* ========================================
   Logo Section
   ======================================== */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* width: 100px;
    height: 100px; */
    background: #a00a21;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    animation: pulse-shadow 3s ease-in-out infinite;
    overflow: hidden;
    padding: 12px;
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 0 0 rgba(198, 12, 41, 0.1);
    }
    50% {
        box-shadow: var(--shadow-xl), 0 0 0 15px rgba(198, 12, 41, 0);
    }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.welcome-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle-text {
    font-size: 15px;
    color: var(--gray-500);
    font-weight: 400;
}

/* ========================================
   Error Message
   ======================================== */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin-bottom: 24px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
}

.error-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* ========================================
   Form Inputs
   ======================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.label-icon {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.input-wrapper {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-input::placeholder {
    color: var(--gray-400);
}

.login-input:hover {
    border-color: var(--gray-300);
    background: var(--white);
}

.login-input:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(198, 12, 41, 0.1);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.input-wrapper.focused .input-focus-line,
.login-input:focus ~ .input-focus-line {
    width: calc(100% - 28px);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.eye-icon {
    width: 22px;
    height: 22px;
}

.hidden {
    display: none !important;
}

/* ========================================
   Submit Button
   ======================================== */
.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(198, 12, 41, 0.35);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.login-button::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;
}

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

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(198, 12, 41, 0.45);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px 0 rgba(198, 12, 41, 0.35);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.button-text {
    transition: opacity 0.2s ease;
}

.button-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.login-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Loading Animation */
.button-loader {
    display: flex;
    gap: 6px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ========================================
   Footer
   ======================================== */
.login-footer {
    margin-top: 32px;
    text-align: center;
}

.footer-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
}

.shield-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 640px) {
    .login-card {
        margin: 16px;
        padding: 32px 24px;
        border-radius: 20px;
    }

    .logo-wrapper {
        width: 80px;
        height: 80px;
        border-radius: 20px;
        padding: 10px;
    }

    .welcome-text {
        font-size: 24px;
    }

    .subtitle-text {
        font-size: 14px;
    }

    .login-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .login-button {
        padding: 16px 20px;
    }

    .orb-1 {
        width: 400px;
        height: 400px;
        top: -150px;
        right: -150px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
        bottom: -80px;
        left: -80px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 28px 20px;
    }

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

    .welcome-text {
        font-size: 22px;
    }

    .login-form {
        gap: 20px;
    }
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment below for dark mode support */
    /*
    .login-body {
        background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 50%, var(--gray-900) 100%);
    }

    .login-card {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(55, 65, 81, 0.5);
    }

    .welcome-text {
        color: var(--white);
    }

    .subtitle-text {
        color: var(--gray-400);
    }

    .input-label {
        color: var(--gray-300);
    }

    .login-input {
        background: var(--gray-800);
        border-color: var(--gray-700);
        color: var(--white);
    }

    .login-input:hover {
        background: var(--gray-700);
        border-color: var(--gray-600);
    }

    .login-input:focus {
        background: var(--gray-800);
    }
    */
}

/* ========================================
   Additional Animations
   ======================================== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: rgba(198, 12, 41, 0.2);
    color: var(--primary-dark);
}

/* Focus visible for accessibility */
.login-input:focus-visible,
.login-button:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
