/* ===============================================
   Modern Login Page Design
   Beautiful, Elegant, Professional
   =============================================== */

/* Background & Layout */
body:has(.login-wrapper) {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F5F5DC 0%, #FAFAF0 50%, #E8D4A0 100%);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Animated Background */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

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

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #D4AF37 0%, #E8D4A0 100%);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #F4E4B0 0%, #F5F5DC 100%);
    bottom: -150px;
    left: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #B8941F 0%, #D4AF37 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

/* Login Wrapper */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    animation: fadeInUp 0.8s ease-out;
}

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

/* Login Container */
.login-wrapper .login-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 20px 60px rgba(212, 175, 55, 0.15),
        0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-wrapper .login-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 30px 80px rgba(212, 175, 55, 0.25),
        0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
    animation: scaleIn 0.6s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.logo-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4AF37 0%, #F4E4B0 100%);
    padding: 4px;
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.4),
        0 0 0 8px rgba(212, 175, 55, 0.1);
    transition: all 0.4s ease;
    animation: pulse 3s infinite;
}

.logo-circle:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.6),
        0 0 0 12px rgba(212, 175, 55, 0.15);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(212, 175, 55, 0.4),
            0 0 0 8px rgba(212, 175, 55, 0.1);
    }
    50% {
        box-shadow: 
            0 15px 40px rgba(212, 175, 55, 0.5),
            0 0 0 12px rgba(212, 175, 55, 0.15);
    }
}

.logo-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0;
    font-weight: 400;
}

/* Login Form */
.login-form {
    margin-top: 32px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 24px;
    animation: slideInRight 0.6s ease-out both;
}

.input-wrapper:nth-child(1) {
    animation-delay: 0.3s;
}

.input-wrapper:nth-child(2) {
    animation-delay: 0.4s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.input-wrapper input {
    width: 100%;
    padding: 16px 48px 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.input-wrapper input:focus + label {
    color: #D4AF37;
    transform: translateY(-8px) scale(0.9);
}

.input-wrapper input:not(:placeholder-shown) + label {
    transform: translateY(-8px) scale(0.9);
}

.input-wrapper label {
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: #a0aec0;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #ffffff;
    padding: 0 8px;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-wrapper input:focus ~ .input-icon {
    color: #D4AF37;
    transform: translateY(-50%) scale(1.1);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px 32px;
    margin-top: 32px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 
        0 8px 24px rgba(212, 175, 55, 0.4),
        0 0 0 0 rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.6s ease-out 0.5s both;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 32px rgba(212, 175, 55, 0.5),
        0 0 0 4px rgba(212, 175, 55, 0.1);
}

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

.login-btn .btn-loader {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-loader {
    display: inline-block;
}

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

/* Message Styles */
.message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.4s ease-out;
    display: none;
}

.message:not(:empty) {
    display: block;
}

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

.message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.login-footer {
    margin-top: 32px;
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-footer p {
    margin: 0;
    font-size: 13px;
    color: #718096;
    font-weight: 400;
}

/* ===============================================
   Responsive Design
   =============================================== */

@media (max-width: 768px) {
    .login-wrapper {
        max-width: 100%;
        padding: 16px;
    }

    .login-wrapper .login-container {
        padding: 36px 28px;
        border-radius: 20px;
    }

    .logo-circle {
        width: 80px;
        height: 80px;
    }

    .login-title {
        font-size: 24px;
    }

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

    .input-wrapper input {
        padding: 14px 44px 14px 18px;
        font-size: 14px;
    }

    .login-btn {
        padding: 14px 28px;
        font-size: 15px;
    }

    .gradient-orb {
        filter: blur(60px);
    }

    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
    }

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

@media (max-width: 480px) {
    .login-wrapper .login-container {
        padding: 32px 24px;
    }

    .logo-circle {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 13px;
    }

    .input-wrapper {
        margin-bottom: 20px;
    }

    .input-wrapper input {
        padding: 13px 42px 13px 16px;
        font-size: 14px;
    }

    .input-wrapper label {
        font-size: 13px;
        right: 42px;
    }

    .input-wrapper .input-icon {
        right: 14px;
        font-size: 14px;
    }

    .login-btn {
        padding: 13px 24px;
        font-size: 14px;
        margin-top: 24px;
    }

    .login-footer p {
        font-size: 12px;
    }
}

/* ===============================================
   Dark Mode Support (Optional)
   =============================================== */

@media (prefers-color-scheme: dark) {
    body:has(.login-wrapper) {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .login-wrapper .login-container {
        background: rgba(30, 30, 40, 0.95);
    }

    .login-title {
        color: #e2e8f0;
    }

    .login-subtitle,
    .login-footer p {
        color: #a0aec0;
    }

    .input-wrapper input {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }

    .input-wrapper label {
        background: rgba(30, 30, 40, 0.95);
    }
}

/* ===============================================
   Animations & Transitions
   =============================================== */

/* Smooth transitions for all interactive elements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Selection colors */
::selection {
    background: #D4AF37;
    color: #ffffff;
}

::-moz-selection {
    background: #D4AF37;
    color: #ffffff;
}

