/* =========================
   BASE GENERAL
   ========================= */

html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f6fa;
    color: #222;
}

/* Links */
a {
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* Inputs y selects un poco más compactos en toda la app */
form .form-select,
form .form-control {
    font-size: 0.9rem;
}

/* =========================
   NAVBAR / LAYOUT
   ========================= */

.navbar-brand img {
    border-radius: 8px;
    max-height: 34px;
    width: auto;
}

.navbar-brand span {
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Contenedor principal (debajo del navbar) */
main {
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
}

/* =========================
   TABLA DE CASOS (ADMIN / SECRETARIA)
   ========================= */

.tabla-casos {
    font-size: 0.9rem;
}

    .tabla-casos th {
        white-space: nowrap;
    }

/* celdas largas con ... */
.text-truncate {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges de estado: afinamos tamaño para todas */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.5em;
}

/* Botones de acciones dentro de tablas: más compactos */
.table .btn.btn-outline-primary,
.table .btn.btn-outline-danger,
.table .btn.btn-outline-success,
.table .btn.btn-outline-secondary,
.table .btn.btn-warning,
.table .btn.btn-success,
.table .btn.btn-danger {
    padding: 0.15rem 0.45rem;
    font-size: 0.8rem;
}

/* =========================
   TARJETAS "MIS CASOS" (TÉCNICO)
   ========================= */

/* Contenedor general de la lista */
.mis-cita-list {
    max-width: 720px;
    margin: 0 auto;
}

/* Cada tarjeta */
.mis-cita-item {
    border-radius: 0.9rem;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.6rem 0.85rem;
    background-color: #ffffff;
    transition: box-shadow 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

    .mis-cita-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        text-decoration: none;
        background-color: #fdfdff;
        transform: translateY(-1px);
    }

/* Icono de tipo de falla dentro de la tarjeta */
.mis-cita-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background-color: rgba(13, 110, 253, 0.06);
    color: #0d6efd;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Truncamos un poco el texto en tarjetas */
.mis-cita-item .text-truncate {
    max-width: 260px;
}

/* "Píldoras" de estado si las usas (estado-pill) */
.estado-pill {
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
}

/* Responsive tarjetas */
@media (max-width: 576px) {
    .mis-cita-item {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
        flex-direction: column;
        align-items: flex-start;
    }

        .mis-cita-item .text-truncate {
            max-width: 180px;
        }
}

/* =========================
   LOGIN / AUTENTICACIÓN (Identity)
   ========================= */

/* Fondo general de páginas de login */
.auth-bg,
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d6efd 0%, #0b2345 50%, #1b1f3b 100%);
    display: flex;
    flex-direction: column;
}

/* Wrapper centrado del formulario */
.auth-wrapper {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.75rem;
}

/* Tarjeta del formulario */
.auth-card {
    width: 420px;
    max-width: 95%;
    background-color: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    padding: 2rem 2.25rem;
}

/* Logo dentro del login */
.auth-logo {
    max-width: 160px;
    height: auto;
}

/* Título de página en login */
.page-title {
    margin-bottom: 1.75rem;
    font-weight: 600;
}

/* Variante con panel izquierdo (si la usas en otro layout de login) */
.auth-card-left {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.98));
    position: relative;
}

/* Marca de agua con nombre de la empresa (opcional) */
.brand-watermark {
    position: absolute;
    left: 2rem;
    bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

/* Botón primario global (login, filtros, etc.) */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

/* En móviles el login se centra y no ocupa todo el ancho */
@media (max-width: 767.98px) {
    .auth-card {
        max-width: 420px;
        padding: 1.75rem 1.5rem;
    }

    .auth-card-left {
        display: none !important;
    }
}

/* =========================
   FOOTER
   ========================= */

.footer {
    font-size: 0.8rem;
}

/* =========================
   UTILIDADES EXTRA
   ========================= */

/* Link primario sin subrayado, pero con hover global arriba */
a.link-primary {
    text-decoration: none;
}
