/* Base Variables & Reset */
:root {
    --bg-gradient: radial-gradient(circle at center, rgba(15, 23, 42, 0.8) 0%, rgba(9, 15, 30, 0.98) 100%);
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-border: #10b981; /* Emerald-green accent */
    --input-focus-glow: rgba(16, 185, 129, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #10b981;
    --accent-hover: #059669;
    --accent-glow: rgba(16, 185, 129, 0.4);
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-border: rgba(239, 68, 68, 0.3);
    --error-text: #ef4444;
}

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

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0b0f19;
    color: var(--text-primary);
}

/* Background Cover styling */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://rozo.e-fluxs.com/imagenes/bg.png');
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) contrast(1.1);
    z-index: -2;
}

body::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    z-index: -1;
}

/* Page Wrapper */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    animation: fadeIn 0.8s ease-out;
}

/* Glassmorphism Card Container */
.glass-container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(16, 185, 129, 0.05);
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    pointer-events: none;
}

/* Header & Logo styling */
.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-container {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.05) rotate(2deg);
    border-color: rgba(16, 185, 129, 0.4);
}

.logo-image {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Inputs & Labels styling */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.input-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s ease;
}

.modern-input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 46px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.modern-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 4px var(--input-focus-glow);
    background: rgba(15, 23, 42, 0.85);
}

.modern-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--accent-color);
}

/* Button styling */
.modern-button {
    height: 52px;
    margin-top: 10px;
    background: var(--accent-color);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.modern-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.modern-button:active {
    transform: translateY(0);
}

.button-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.modern-button:hover .button-icon {
    transform: translateX(4px);
}

/* Error messages styling */
.error-message {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--error-text);
    font-size: 13.5px;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

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

/* Footer / Pie styling */
#Pie {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

#Pie p {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

#Pie a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

#Pie a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .glass-container {
        padding: 30px 20px;
        gap: 20px;
    }
    
    .login-header h2 {
        font-size: 22px;
    }
}