body {
    background-color: #f4f4f4;
}

.card-custom {
    background: linear-gradient(135deg, #c4003a, #8f0027);
    color: white;
    border-radius: 12px;
    transition: 0.3s ease;
    cursor: pointer;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

body {
    background-image: url("img/fondo.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.header-custom {
    background-image: url("img/barra.png"); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.header-session-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(4px);
}

.header-rol-tag {
    background: rgba(255,255,255,0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-logout-btn {
    color: white;
    background: rgba(255,255,255,0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 16px;
}

.header-logout-btn:hover {
    background: rgba(255,255,255,0.35);
    color: white;
}
.titulo-icono{
    width: 70px;
    height: auto;
}

@media (max-width: 350px){
    .titulo-icono{
        width: 55px;
    }
}
html, body{
    height: 100%;
}

.wrapper{
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.content{
    flex: 1;
}
footer{
    margin-top: -5px;
}


.area-wrapper {
    min-height: 80vh;
    padding: 50px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.area-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    color: #8b0000;
    margin-bottom: 50px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Inspector Cards - Puebla Reference Style */
.inspectores-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.inspector-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.inspector-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.14);
}

.inspector-card-name {
    background: linear-gradient(to right, #b3002d, #d4145a);
    color: white;
    padding: 14px 20px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.inspector-card-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
}

.inspector-card-foto img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e8e8e8;
}

.inspector-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inspector-card-numtrab {
    font-size: 13px;
    color: #888;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.inspector-card-puesto {
    font-size: 15px;
    color: #444;
    margin: 0;
    line-height: 1.4;
}

/* Modal section titles */
.modal-seccion-titulo {
    font-size: 14px;
    font-weight: 700;
    color: #8b0000;
    padding: 10px 20px 4px;
    margin: 0;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-seccion-titulo i {
    font-size: 16px;
}

.btn-detalles-formal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 20px;
    border: 2px solid #b3002d;
    background: transparent;
    color: #b3002d;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-detalles-formal:hover {
    background-color: #b3002d;
    color: white;
}

@media (max-width: 768px) {
    .inspectores-grid {
        grid-template-columns: 1fr;
    }
    .area-wrapper {
        padding: 30px 15px;
    }
    .area-title {
        font-size: 24px;
    }
}


.login-container{
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box{
    width: 420px;
    padding: 60px 50px;
    border-radius: 40px;
    background: #244b68;
    box-shadow: 0 25px 40px rgba(0,0,0,0.4);
    text-align: center;
}

.login-user-icon{
    width: 120px;
    margin-bottom: 30px;
}

.login-input{
    width: 100%;
    margin-bottom: 30px;
    padding: 14px 20px;
    border-radius: 30px;
    border: 3px solid #d9d9d9;
    background: linear-gradient(to right,#1e3c42,#4fa3a5);
    color: white;
    font-size: 16px;
}

.login-input::placeholder{
    color: #eaeaea;
    font-weight: bold;
}

.login-btn{
    width: 100%;
    padding: 18px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(to right,#0c1f3f,#142c5c);
    color: white;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 20px;
}



.login-box{
    width: 420px;
    padding: 60px 50px;
    border-radius: 40px;

   
    background: rgba(36, 75, 104, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow: 0 25px 50px rgba(0,0,0,0.45);
    text-align: center;
    transition: 0.4s ease;
}

.login-box:hover{
    transform: translateY(-6px);
    box-shadow: 0 35px 60px rgba(0,0,0,0.55);
}


.login-user-icon{
    width: 120px;
    margin-bottom: 30px;
}


.login-input{
    width: 100%;
    margin-bottom: 28px;
    padding: 15px 22px;
    border-radius: 30px;
    border: 3px solid #d9d9d9;

    background: linear-gradient(to right,#1e3c42,#4fa3a5);
    color: white;
    font-size: 16px;
    outline: none;
    transition: 0.3s ease;
}

.login-input::placeholder{
    color: #f1f1f1;
    font-weight: bold;
    letter-spacing: 1px;
}


.login-input:focus{
    border-color: #4fa3a5;
    box-shadow: 0 0 12px rgba(79,163,165,0.8);
    transform: scale(1.02);
}


.login-btn{
    width: 100%;
    padding: 18px;
    border-radius: 30px;
    border: none;

    background: linear-gradient(to right,#0c1f3f,#142c5c);
    color: white;
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 20px;
    cursor: pointer;
    transition: 0.3s ease;
}


.login-btn:hover{
    transform: translateY(-3px);
    box-shadow:
        0 0 10px rgba(20,44,92,0.9),
        0 0 20px rgba(20,44,92,0.7),
        0 0 40px rgba(20,44,92,0.5);
}

.login-btn:active{
    transform: scale(0.97);
}

/* ============================================
   BREADCRUMBS (Migas de Pan)
   ============================================ */

nav.breadcrumb-nav {
    background: linear-gradient(135deg, rgba(143, 0, 39, 0.08), rgba(196, 0, 58, 0.05));
    border-bottom: 2px solid rgba(143, 0, 39, 0.15);
    padding: 12px 0;
}

nav.breadcrumb-nav ol.breadcrumb-list {
    list-style: none !important;
    list-style-type: none !important;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto;
    margin-bottom: 0;
    padding: 0 20px;
    padding-left: 20px;
    max-width: 1200px;
    gap: 0;
}

nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding-left: 0;
}

nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item + li.breadcrumb-item::before {
    content: "›";
    margin: 0 10px;
    color: #b3002d;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    float: none;
    padding-right: 0;
}

nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item a {
    color: #8f0027;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.25s ease;
}

nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item a:hover {
    background: rgba(143, 0, 39, 0.12);
    color: #c4003a;
    transform: translateY(-1px);
}

nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item.active {
    color: #555;
    font-weight: 600;
}

.breadcrumb-home {
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 576px) {
    nav.breadcrumb-nav {
        padding: 10px 0;
    }
    nav.breadcrumb-nav ol.breadcrumb-list {
        padding: 0 15px;
    }
    nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item {
        font-size: 13px;
    }
    nav.breadcrumb-nav ol.breadcrumb-list li.breadcrumb-item + li.breadcrumb-item::before {
        margin: 0 6px;
    }
}

/* ============================================
   ADMIN PANEL
   ============================================ */

.admin-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    background: #fff;
}

.admin-card-header {
    background: linear-gradient(135deg, #8f0027, #c4003a);
    color: #fff;
    padding: 18px 28px;
    font-weight: bold;
}

.admin-card-body {
    padding: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
}

.form-label-custom {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-seccion-titulo {
    font-size: 15px;
    font-weight: 700;
    color: #8b0000;
    padding-bottom: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(143, 0, 39, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-seccion-titulo i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FOTO UPLOAD ZONE
   ============================================ */

.foto-upload-zone {
    border: 3px dashed rgba(143,0,39,0.3);
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(143,0,39,0.02);
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.foto-upload-zone:hover, .foto-upload-zone.drag-over {
    border-color: #c4003a;
    background: rgba(143,0,39,0.06);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(143,0,39,0.1);
}

.foto-input-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: 15px;
}

.upload-icon {
    font-size: 40px;
}

.foto-preview {
    max-width: 200px;
    max-height: 260px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.foto-preview-edit {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ============================================
   TABLA ADMIN
   ============================================ */

.table-admin {
    margin-bottom: 0;
}

.table-admin thead {
    background: linear-gradient(135deg, #2c2c2c, #444);
    color: #fff;
}

.table-admin thead th {
    padding: 14px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    white-space: nowrap;
}

.table-admin tbody tr {
    transition: all 0.2s ease;
}

.table-admin tbody tr:hover {
    background: rgba(143,0,39,0.04);
}

.table-admin td {
    vertical-align: middle;
    padding: 12px 16px;
    font-size: 14px;
}

.tabla-foto {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.buscador-tabla {
    max-width: 280px;
    border-radius: 20px;
    font-size: 14px;
}

/* ============================================
   STATUS BADGES
   ============================================ */

.badge-estatus {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-activo {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.badge-inactivo {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: #fff;
}

/* Role badges */
.badge-rol {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-tics {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
}

.badge-auxiliar {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.badge-admin-rol {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #fff;
}

/* ============================================
   MODAL INSPECTOR - Formal Government Style
   ============================================ */

.modal-inspector {
    border: none;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.modal-header-formal {
    background: linear-gradient(135deg, #2c2c2c, #3d3d3d);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-formal .modal-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Top section: photo + identification */
.modal-detalle-top {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding: 30px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.modal-foto-container {
    flex-shrink: 0;
}

.modal-foto {
    width: 180px;
    height: 230px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.modal-ident {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 10px;
}

.modal-cargo-label {
    font-size: 13px;
    color: #888;
    margin: 8px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-nombre {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

/* Data rows: structured table */
.modal-detalle-datos {
    padding: 0;
}

.tabla-detalles {
    width: 100%;
    border-collapse: collapse;
}

.tabla-detalles tr {
    border-bottom: 1px solid #eee;
}

.tabla-detalles tr:last-child {
    border-bottom: none;
}

.tabla-detalles td {
    padding: 12px 24px;
    font-size: 14px;
    vertical-align: top;
}

.td-label {
    font-weight: 600;
    color: #555;
    width: 40%;
    background: #f8f8f8;
    white-space: nowrap;
}

.td-valor {
    color: #222;
}

.modal-admin-bar {
    padding: 14px 24px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 576px) {
    .modal-detalle-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .td-label {
        white-space: normal;
    }
}

/* ============================================
   ALERTAS FEEDBACK
   ============================================ */

.alerta {
    padding: 14px 22px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 20px;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alerta i {
    font-size: 18px;
}

.alerta-exito {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alerta-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================
   UPLOAD ICON FORMAL
   ============================================ */

.upload-icon-formal {
    font-size: 40px;
    color: #999;
}

/* ============================================
   FOOTER INSTITUCIONAL
   ============================================ */

.footer-grecas {
    margin-top: 50px;
}

.footer-institucional {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #ccc;
    padding: 30px 0 15px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.footer-col h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.footer-col p {
    font-size: 13px;
    margin: 4px 0;
    line-height: 1.5;
}

.footer-col i {
    color: #c4003a;
    margin-right: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    color: #888;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ============================================
   BOTÓN FLOTANTE DE CONTACTO
   ============================================ */

.btn-contacto-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8f0027, #c4003a);
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(143, 0, 39, 0.4);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse-contact 2s infinite;
}

.btn-contacto-flotante:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(143, 0, 39, 0.5);
    animation: none;
}

@keyframes pulse-contact {
    0% { box-shadow: 0 4px 16px rgba(143, 0, 39, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(143, 0, 39, 0.6); }
    100% { box-shadow: 0 4px 16px rgba(143, 0, 39, 0.4); }
}

/* ============================================
   MODAL CONTACTO
   ============================================ */

.contacto-header-modal {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.contacto-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.contacto-header-modal h5 {
    font-weight: 700;
    color: #222;
}

.contacto-header-modal small {
    color: #888;
}