/* ============================================================
   PETMANAGER — Estilos globales
   ============================================================ */

:root {
    --pm-primary:   #0d6efd;
    --pm-success:   #198754;
    --pm-danger:    #dc3545;
    --pm-warning:   #ffc107;
    --pm-bg:        #f5f7fb;
    --pm-card-bg:   #ffffff;
    --pm-border:    #dee2e6;
    --pm-radius:    12px;
    --pm-shadow:    0 2px 12px rgba(0,0,0,.07);
    --pm-font:      'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* BASE */
body {
    font-family: var(--pm-font);
    background-color: var(--pm-bg);
    color: #212529;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* CARDS */
.card {
    border: none;
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow);
    background: var(--pm-card-bg);
}

.card-header {
    border-radius: var(--pm-radius) var(--pm-radius) 0 0 !important;
    background: linear-gradient(135deg, var(--pm-primary), #0a58ca);
    color: #fff;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-bottom: none;
}

.card-header.success {
    background: linear-gradient(135deg, var(--pm-success), #146c43);
}

/* TABLAS */
.table {
    --bs-table-striped-bg: #f8f9ff;
}

.table thead th {
    background-color: #e9ecef;
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #495057;
    border-bottom: 2px solid var(--pm-border);
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: #f0f4ff;
    cursor: default;
}

/* BOTONES */
.btn { border-radius: 8px; font-weight: 500; }
.btn-sm { font-size: .8rem; }

.btn-accion {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* FORMULARIOS */
.form-label { font-weight: 600; font-size: .875rem; color: #495057; }

.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--pm-border);
    font-size: .9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}

.form-section {
    background: #f8f9fa;
    border-radius: var(--pm-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--pm-border);
}

.form-section-title {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--pm-primary);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--pm-primary);
    display: inline-block;
}

/* STATS CARDS (Dashboard) */
.stat-card {
    border-radius: var(--pm-radius);
    padding: 1.25rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--pm-shadow);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: .85;
}

.stat-card .stat-numero {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .85rem;
    opacity: .9;
}

/* FOTO MASCOTA */
.foto-mascota {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--pm-border);
    cursor: zoom-in;
    transition: transform .2s;
}

.foto-mascota:hover { transform: scale(1.1); }

.foto-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e9ecef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.4rem;
}

/* FOTO VISITA */
.foto-visita {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--pm-border);
    cursor: zoom-in;
}

/* MODAL IMAGEN AMPLIADA */
#modalFoto .modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    padding: 0;
    border-radius: 0 0 var(--pm-radius) var(--pm-radius);
}

#modalFoto img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

/* NAVBAR */
.navbar { padding: .65rem 1.5rem; }
.navbar-brand { font-size: 1.1rem; }
.nav-link { font-size: .9rem; border-radius: 6px; padding: .4rem .75rem !important; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.15); }

/* BÚSQUEDA */
.busqueda-highlight { background: #fff3cd; border-radius: 3px; padding: 0 2px; }

/* ALERTAS */
.alert { border-radius: var(--pm-radius); border: none; }

/* FOOTER */
.footer { font-size: .82rem; }

/* PAGINACIÓN */
.page-link { border-radius: 6px !important; margin: 0 2px; }

/* RESPONSIVE */
@media (max-width: 768px) {
    main { padding: 1rem !important; }
    .stat-card .stat-numero { font-size: 1.5rem; }
    .table-responsive { font-size: .82rem; }
}

/* UTILIDADES */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
