:root {
    --bg: #f0f4f9;
    --surface: #ffffff;
    --navy: #0d1f3c;
    --accent: #0ea5e9;
    --accent2: #3b82f6;
    --text: #1e293b;
    --sub: #64748b;
    --muted: #94a3b8;
    --border: #e2e8f0;
}

body {
    min-height: 100vh;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 10% 10%, rgba(14, 165, 233, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 90% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.045) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Card */
.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border) !important;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(14, 165, 233, 0.08),
        0 32px 64px rgba(0, 0, 0, 0.07) !important;
    animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* Logo */
.logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

/* Heading */
.form-heading h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    color: var(--text);
    line-height: 1.2;
}

/* Inputs */
.field-label {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--sub);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.i-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
    pointer-events: none;
    z-index: 5;
}

.input-wrap .form-control {
    padding-left: 40px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
}

.input-wrap .form-control::placeholder {
    color: var(--muted);
}

.input-wrap .form-control:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.input-wrap .form-control:focus~.i-icon {
    stroke: var(--accent);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 5;
}

.toggle-pass svg {
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}

.toggle-pass:hover svg {
    stroke: var(--accent);
}

/* Checkbox */
.remember {
    cursor: pointer;
    user-select: none;
}

.remember input {
    display: none;
}

.checkmark {
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
    flex-shrink: 0;
}

.checkmark svg {
    width: 9px;
    height: 9px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.15s;
}

.remember input:checked~.checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.28);
}

.remember input:checked~.checkmark svg {
    opacity: 1;
}

.forgot {
    font-size: 0.83rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.forgot:hover {
    opacity: 0.7;
}

/* Button */
.btn-login {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(14, 165, 233, 0.38);
    filter: brightness(1.04);
}

.btn-login:hover::before {
    opacity: 1;
}

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

.input-wrap .form-control.is-invalid {
    border-color: #df6672 !important;
    box-shadow: 0 0 0 3px rgba(221, 83, 97, 0.12) !important;
    background-image: none !important;
    /* quita el ícono de Bootstrap */
}

.input-wrap .form-control.is-valid {
    border-color: #26ad6e !important;
    box-shadow: none !important;
    background-image: none !important;
    /* quita el ícono de Bootstrap */
}
