@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --cyan:  #12CFF4;
    --gold:  #F4A300;
    --black: #0B0B0D;
    --white: #FFFFFF;
    --slate: #2E3238;
}

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

body {
    font-family: 'Outfit', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* ── Canvas de fondo ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
}

/* ── Wrapper centrado ── */
.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* ── Tarjeta principal ── */
.login-card {
    display: flex;
    width: 720px;
    min-height: 480px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(18,207,244,0.2),
        0 24px 64px rgba(18,207,244,0.12),
        0 8px 32px rgba(0,0,0,0.08);
}

/* ════════════════════════
   PANEL IZQUIERDO
   ════════════════════════ */
.form-panel {
    flex: 1.1;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.6rem 2.4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(18,207,244,0.15);
}

/* ── Logo superior izquierdo ──
   Pon tu imagen con el nombre "logo.png" en la misma carpeta.
   Si tu imagen es cuadrada, el border-radius:50% la hace redonda.
   Si ya es redonda o rectangular, ajusta el border-radius abajo. */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.logo-img {
    width: 36px;          /* ← cambia el tamaño aquí */
    height: 36px;
    border-radius: 50%;   /* ← 50% = círculo | 8px = cuadrado redondeado | 0 = sin redondeo */
    object-fit: cover;
    border: 2px solid rgba(18,207,244,0.35);
}

.logo span {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Título */
.form-panel h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.subtitle {
    font-size: 13px;
    color: #8a9099;
    margin-bottom: 2rem;
}

/* Campos */
.field { margin-bottom: 1.3rem; }

.field label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0aa8c8;        /* cyan oscurecido para legibilidad en claro */
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #d0dde3;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    color: var(--black);
    outline: none;
    transition: border-color 0.2s;
}

.field input:focus      { border-bottom-color: var(--cyan); }
.field input::placeholder { color: #b0bec5; }

/* Olvidé contraseña */
.forgot {
    text-align: right;
    margin-top: 8px;
    font-size: 11px;
    color: #0aa8c8;
    cursor: pointer;
    transition: color 0.2s;
}
.forgot:hover { color: var(--cyan); text-decoration: underline; }

/* Botón */
button[type="submit"] {
    margin-top: 1.8rem;
    width: 100%;
    padding: 0.85rem;
    background: var(--cyan);
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(18,207,244,0.3);
}

button[type="submit"]:hover {
    background: #2dd8f8;
    box-shadow: 0 6px 28px rgba(18,207,244,0.45);
}

button[type="submit"]:active  { transform: scale(0.98); }

button[type="submit"]:disabled {
    background: #b0bec5;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
}

/* ════════════════════════
   PANEL DERECHO
   ════════════════════════ */
.visual-panel {
    flex: 0.9;
    background: linear-gradient(160deg, #1a8faa 0%, #0d6080 45%, #094d6a 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem;
}

/* ── Imagen redonda del panel derecho ──
   Pon tu imagen con el nombre "logo-circle.png" en la misma carpeta.
   Puede ser el mismo logo o una imagen diferente. */
.brand-circle {
    position: relative;
    z-index: 2;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 2.5px solid rgba(18,207,244,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(18,207,244,0.2);
}

.brand-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* la imagen llena el círculo sin deformarse */
    border-radius: 50%;
}

.brand-circle-svg {
    width: 44px;
    height: 44px;
    display: none;       /* se muestra solo si la imagen no carga */
}

.brand-name {
    position: relative;
    z-index: 2;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
}

.brand-tagline {
    position: relative;
    z-index: 2;
    font-size: 11px;
    color: var(--gold);
    margin-top: 5px;
    letter-spacing: 0.06em;
    text-align: center;
}

/* Skyline al fondo */
.skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    z-index: 1;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .login-card {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        min-height: auto;
    }
    .visual-panel { min-height: 200px; flex: none; }
}

/* REGLAS DE RESPONSIVIDAD PARA TODAS LAS TABLAS DEL SISTEMA */
@media screen and (max-width: 768px) {
    /* Ocultamos la cabecera de la tabla porque verticalmente no tiene sentido */
    .user-table thead {
        display: none;
    }

    /* Transformamos cada fila en un bloque independiente (parecido a una tarjeta) */
    .user-table tr {
        display: block;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    /* Hacemos que cada celda ocupe el ancho completo y se alinee verticalmente */
    .user-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 4px !important;
        border-bottom: 1px dashed #edf2f7;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Eliminamos la línea discontinua de la última celda de acciones */
    .user-table td:last-child {
        border-bottom: none;
        justify-content: center; /* Centra los botones de acción */
        gap: 10px;
        margin-top: 5px;
    }

    /* Opcional: Agrega un texto indicativo antes del valor para saber qué columna es */
    .user-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #4a5568;
        font-size: 0.85rem;
    }
}

#mantenimiento-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}