
:root {
    --blue-primary:   #2563EB;
    --blue-dark:      #1e40af;
    --blue-light:     #eff6ff;
    --teal-primary:   #00E0C6;
    --teal-dark:      #0d9488;
    --yellow-main:    #FACC15;
    --yellow-dark:    #F59E0B;
    --slate-900:      #0f172a;
    --slate-800:      #1e293b;
    --slate-700:      #334155;
    --slate-500:      #64748b;
    --slate-400:      #94a3b8;
    --slate-100:      #f1f5f9;
    --slate-50:       #f8fafc;
    --white:          #ffffff;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--slate-700);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #F0F9FF;
}

h1, h2, h3, h4 {
    font-family: 'Nunito', sans-serif;
    color: #0c4a6e;
    letter-spacing: -0.3px;
}

p, span, li, a, button, input, label {
    font-family: 'Inter', sans-serif;
}

/* ---------- Navbar (idéntico al sitio público) ---------- */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.navbar-brand img {
    height: 56px;
    width: auto;
}

.navbar-brand span {
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--blue-primary), var(--teal-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    color: var(--slate-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 3px;
    left: 0;
    bottom: -6px;
    background: linear-gradient(to right, var(--teal-primary), var(--blue-primary));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--blue-primary);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    width: 100%;
}

/* Botón Intranet (amarillo, igual al original) */
.intranet-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--yellow-main), var(--yellow-dark));
    color: #78350F;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(245,158,11,0.25);
    transition: all 0.3s ease;
    cursor: default;    /* Activo = página actual */
}

.intranet-btn i {
    color: #92400E;
}

/* ---------- Hamburger (móvil) ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-700);
    cursor: pointer;
    z-index: 60;
}

/* ---------- Mobile overlay ---------- */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 55;
    backdrop-filter: blur(4px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: var(--bg-card, white);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    z-index: 56;
    display: flex;
    flex-direction: column;
}

.mobile-overlay.open {
    display: block;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.mobile-menu-header span {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue-primary);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--slate-700);
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
}

.mobile-nav-links li a,
.mobile-nav-links li span {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.mobile-nav-links li a:hover {
    color: var(--blue-primary);
}

.mobile-intranet-btn {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--yellow-main), var(--yellow-dark));
    color: #78350F;
    text-decoration: none;
    cursor: default;
}

/* ---------- Split Layout ---------- */
.login-split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-card, white);
}

/* ---------- Left Side (Image & Brand) ---------- */
.login-left {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.80), rgba(15, 23, 42, 0.90)), url('../img/niebla.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: white;
    text-align: center;
    overflow: hidden;
}

/* Minimalist decoration lines */
.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(45deg, transparent, transparent 100px, rgba(255,255,255,0.03) 100px, rgba(255,255,255,0.03) 102px);
    pointer-events: none;
    z-index: 1;
}

.login-left-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-left-logo {
    width: 180px;
    height: auto;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.login-left h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-family: 'Nunito', sans-serif;
}

.login-left p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    max-width: 420px;
    font-weight: 400;
    line-height: 1.6;
}

/* ---------- Right Side (Form) ---------- */
.login-right {
    flex: 1;
    max-width: 680px;
    background-color: var(--bg-card, white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
}

.login-card-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out forwards;
}

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

.login-card-inner h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 0.5rem;
    font-family: 'Nunito', sans-serif;
}
.login-card-inner > p {
    color: var(--slate-500);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* ---------- Form Elements ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-700);
}

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

.input-wrap i {
    position: absolute;
    left: 1.25rem;
    color: var(--slate-400);
    font-size: 1rem;
    transition: color 0.2s;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 0.9rem 2.75rem 0.9rem 3rem;
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: 0.75rem;
    color: var(--slate-800);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    outline: none;
}

.input-wrap input::placeholder {
    color: var(--slate-400);
    font-weight: 400;
}

.input-wrap input:focus {
    background-color: var(--bg-card, white);
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 4px var(--blue-light);
}

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

/* Toggle Password */
.toggle-pass {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.toggle-pass:hover {
    color: var(--blue-primary);
}

/* Remember & Forgot */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.remember-row div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.remember-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue-primary);
    cursor: pointer;
}
.remember-row label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--slate-600);
    cursor: pointer;
}
.remember-row a {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--slate-600);
    text-decoration: none;
    transition: color 0.2s;
}
.remember-row a:hover {
    color: var(--blue-primary);
}

/* Button */
.btn-login {
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--slate-900);
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-login:hover {
    background: var(--blue-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37,99,235,0.25);
}
.btn-login:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Alerts */
.login-alert {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
.login-alert.show { display: flex; }
.login-alert.error { background: #fee2e2; border: 1px solid #fecaca; color: #dc2626; }
.login-alert.success { background: #dcfce7; border: 1px solid #bbf7d0; color: #16a34a; }

@keyframes shake {
    10%, 90%  { transform: translateX(-2px); }
    20%, 80%  { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60%  { transform: translateX(6px); }
}

/* Footer */
.card-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--slate-500);
}
.card-footer a {
    color: var(--slate-800);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}
.card-footer a:hover {
    color: var(--blue-primary);
}

/* ---------- Botón flotante ---------- */
.btn-back {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s ease;
}
.btn-back:hover {
    background-color: var(--bg-card, white);
    color: var(--blue-primary);
    transform: translateX(-3px);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .login-split-layout { flex-direction: column; }
    .login-left { padding: 4rem 2rem; flex: none; min-height: 40vh; }
    .login-right { max-width: 100%; padding: 3rem 1.5rem; }
    .login-left h1 { font-size: 2rem; }
    .btn-back { top: 1rem; left: 1rem; padding: 0.5rem 1rem; }
}

