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

:root {
    --primary: #1a2744;
    --primary-mid: #1e3a5f;
    --primary-bright: #2563eb;
    --primary-light: #3b82f6;
    --accent: #ea580c;
    --accent-light: #f97316;
    --accent-warm: #fdba74;
    --white: #ffffff;
    --gray-50: #f0f4fa;
    --gray-100: #e0e8f5;
    --gray-200: #c5d0e6;
    --gray-400: #6478a0;
    --gray-500: #3b5080;
    --text: #0f172a;
    --text-muted: #3b5080;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --radius: 1rem;
    --shadow: 0 25px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.08);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    margin: 0;
    padding: 1rem;
}

.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/muralfondo.jpg') center/cover no-repeat;
    opacity: 0.18;
}

.login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(15,23,42,0.95) 0%,
        rgba(26,39,68,0.80) 40%,
        rgba(30,58,95,0.70) 70%,
        rgba(15,23,42,0.92) 100%
    );
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: cardAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 60%, var(--primary-bright) 100%);
    padding: 1.8rem 1.5rem 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.login-header img {
    width: 130px;
    height: auto;
    margin-bottom: 0.6rem;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.login-header h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255,255,255,0.9);
    margin: 0;
    position: relative;
    z-index: 1;
}

.login-subtitle {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-warm);
    letter-spacing: 0.06em;
    margin: 0.3rem 0 0;
    position: relative;
    z-index: 1;
}

.login-body {
    padding: 1.5rem 1.5rem 1.2rem;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.login-field .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field .input-wrap i {
    position: absolute;
    left: 0.9rem;
    color: var(--primary-mid);
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s;
}

.login-field input[type="text"],
.login-field input[type="password"] {
    width: 100%;
    border: 1.5px solid var(--gray-200);
    border-radius: 0.65rem;
    padding: 0.75rem 0.9rem 0.75rem 2.6rem;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.login-field input:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: var(--white);
}

.login-field input:focus + i,
.login-field .input-wrap:focus-within i {
    color: var(--primary-bright);
}

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

#logIn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary-bright) 100%);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: background 0.25s, transform 0.1s, box-shadow 0.25s;
    margin-top: 0.6rem;
    box-shadow: 0 4px 16px rgba(30,58,95,0.35);
    position: relative;
    overflow: hidden;
}

#logIn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

#logIn:hover {
    background: linear-gradient(135deg, var(--primary-bright) 0%, var(--primary-light) 100%);
    box-shadow: 0 6px 24px rgba(37,99,235,0.45);
}

#logIn:hover::before {
    left: 100%;
}

#logIn:active {
    transform: scale(0.97);
}

#lblTxt {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--error);
    background: var(--error-bg);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-height: 0;
    transition: opacity 0.3s;
}

.login-footer {
    padding: 0.9rem 1.5rem 1rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    background: var(--gray-50);
}

.login-footer p {
    font-size: 0.72rem;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 480px) {
    body {
        padding: 0;
        align-items: stretch;
    }

    .login-wrapper {
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
    }

    .login-card {
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .login-header {
        padding: 2rem 1.5rem 1.3rem;
    }

    .login-header img {
        width: 120px;
    }

    .login-body {
        padding: 1.5rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-footer {
        padding: 0.75rem 1.5rem 1rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .login-wrapper {
        max-width: 400px;
    }
}

.login-field input:focus-visible {
    outline: 2px solid var(--primary-bright);
    outline-offset: 2px;
}

#logIn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.login-footer-icon { font-size:0.8rem; vertical-align:middle; margin-right:0.2rem; }
