/* =============================================
   SISTEMA DE REPORTES - POLICÍA MUNICIPAL
   Colores institucionales: Azul marino, mezclilla, dorado
   ============================================= */

:root {
    --police-navy: #0a1f3e;      /* Azul marino profundo */
    --police-blue: #1e3a5f;       /* Azul mezclilla */
    --police-light: #2c4c7a;      /* Azul medio */
    --police-gold: #c9a03d;       /* Dorado institucional */
    --police-gold-dark: #b38f2e;  /* Dorado oscuro */
    --police-gray: #e9ecef;       /* Gris claro */
    --police-dark: #212529;       /* Gris oscuro */
    --success: #2c7a4d;           /* Verde sólido */
    --danger: #c92a2a;            /* Rojo sólido */
    --warning: #e67700;           /* Naranja sólido */
    --info: #2c6e9e;              /* Azul info sólido */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: var(--police-navy);
    min-height: 100vh;
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--police-navy);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border-top: 5px solid var(--police-gold);
    animation: slideUp 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.login-header h1 {
    color: var(--police-navy);
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 600;
}

.login-header p {
    color: #6c757d;
    font-size: 14px;
}

/* Formulario login */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.input-group i:first-child {
    position: absolute;
    left: 15px;
    color: var(--police-blue);
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 45px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--police-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 160, 61, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #adb5bd;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--police-navy);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--police-blue);
    transform: translateY(-2px);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    font-size: 12px;
    color: #6c757d;
}

/* =============================================
   NAVBAR - Barra de navegación institucional
   ============================================= */

.navbar {
    background: var(--police-navy);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--police-gold);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-brand span {
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    color: #e9ecef;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: var(--police-gold);
    color: var(--police-navy);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 6px 14px;
    background: rgba(220, 53, 69, 0.8);
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 13px;
}

.logout-btn:hover {
    background: var(--danger);
}

/* Dropdown menú */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle i.fa-chevron-down {
    font-size: 11px;
    margin-left: 6px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    border-top: 3px solid var(--police-gold);
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--police-dark);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--police-gray);
    padding-left: 24px;
}

.dropdown-menu a i {
    width: 20px;
    color: var(--police-gold);
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 5px 0;
}

/* Menú responsivo */
.menu-toggle {
    display: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* =============================================
   CONTAINER
   ============================================= */

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* =============================================
   DASHBOARD HEADER
   ============================================= */

.dashboard-header {
    margin-bottom: 30px;
    color: white;
}

.dashboard-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.dashboard-header h1 i {
    margin-right: 12px;
    color: var(--police-gold);
}

.dashboard-header p {
    font-size: 15px;
    opacity: 0.85;
}

/* =============================================
   STATS GRID - Tarjetas de estadísticas
   ============================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border-left: 4px solid var(--police-gold);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 55px;
    height: 55px;
    background: var(--police-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--police-navy);
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--police-navy);
    margin: 0;
    line-height: 1;
}

/* =============================================
   QUICK ACTIONS - Acciones rápidas
   ============================================= */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.quick-action-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    border: 1px solid #e9ecef;
    border-top: 3px solid var(--police-gold);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--police-gold);
}

.quick-action-icon {
    font-size: 44px;
    margin-bottom: 12px;
}

.quick-action-card:nth-child(1) .quick-action-icon i { color: var(--success); }
.quick-action-card:nth-child(2) .quick-action-icon i { color: var(--police-blue); }
.quick-action-card:nth-child(3) .quick-action-icon i { color: var(--warning); }
.quick-action-card:nth-child(4) .quick-action-icon i { color: var(--info); }

.quick-action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--police-navy);
    margin-bottom: 6px;
}

.quick-action-desc {
    font-size: 12px;
    color: #6c757d;
}

/* =============================================
   CATÁLOGOS SECTION
   ============================================= */

.catalogos-section {
    margin-bottom: 30px;
}

.catalogos-title {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.catalogos-title i {
    margin-right: 10px;
    color: var(--police-gold);
}

.catalogos-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.catalogo-mini-card {
    background: var(--police-blue);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.catalogo-mini-card:hover {
    background: var(--police-light);
    transform: translateY(-3px);
}

.catalogo-mini-icon {
    font-size: 28px;
    color: var(--police-gold);
    margin-bottom: 10px;
}

.catalogo-mini-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.catalogo-mini-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
}

/* =============================================
   CONTENT CARD
   ============================================= */

.content-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--police-gray);
}

.card-header h2 {
    color: var(--police-navy);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.card-header h2 i {
    margin-right: 10px;
    color: var(--police-gold);
}

.btn-link {
    color: var(--police-gold);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-link:hover {
    color: var(--police-gold-dark);
    gap: 10px;
}

/* =============================================
   TABLES
   ============================================= */

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    background: var(--police-gray);
}

.data-table th {
    padding: 12px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--police-navy);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--police-gray);
    font-size: 14px;
    color: #495057;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge-estatus {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.badge-activo { background: var(--success); }
.badge-cancelado { background: var(--danger); }
.badge-suspendido { background: var(--warning); }
.badge-vencido { background: #6c757d; }

/* =============================================
   BUTTONS
   ============================================= */

.btn-primary {
    background: var(--police-navy);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--police-blue);
}

.btn-gold {
    background: var(--police-gold);
    color: var(--police-navy);
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-gold:hover {
    background: var(--police-gold-dark);
}

/* =============================================
   ALERTS
   ============================================= */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
    border-left-color: var(--success);
}

.alert-error {
    background: #ffebee;
    color: var(--danger);
    border-left-color: var(--danger);
}

.alert-warning {
    background: #fff3e0;
    color: var(--warning);
    border-left-color: var(--warning);
}

/* =============================================
   MODAL
   ============================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
    border-top: 4px solid var(--police-gold);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--police-gray);
}

.modal-header h2 {
    color: var(--police-navy);
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #adb5bd;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--police-dark);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--police-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 160, 61, 0.1);
}

/* =============================================
   ANIMACIONES
   ============================================= */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-right {
    animation: slideRight 0.4s ease-out forwards;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--police-navy);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        border-top: 1px solid var(--police-gold);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        padding: 10px 16px;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        background: var(--police-blue);
        margin-top: 5px;
        margin-left: 20px;
        box-shadow: none;
        border-top: none;
    }
    
    .dropdown-menu a {
        color: white;
    }
    
    .dropdown-menu a:hover {
        background: var(--police-light);
    }
    
    .dropdown-menu a i {
        color: var(--police-gold);
    }
    
    .nav-user {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .catalogos-grid-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .catalogos-grid-mini {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* Back button styles */
.back-button {
    margin-bottom: 20px;
}

.back-button a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.back-button a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}
/* Badges para estatus */
.badge-estatus {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Colores específicos para cada estatus */
.badge-estatus.activo,
.badge-estatus[data-estatus="ACTIVO"] {
    background-color: #2c7a4d;
}

.badge-estatus.cancelado,
.badge-estatus[data-estatus="CANCELADO"] {
    background-color: #c92a2a;
}

.badge-estatus.suspendido,
.badge-estatus[data-estatus="SUSPENDIDO"] {
    background-color: #e67700;
}

.badge-estatus.vencido,
.badge-estatus[data-estatus="VENCIDO"] {
    background-color: #6c757d;
}

.badge-estatus.en_tramite,
.badge-estatus[data-estatus="EN_TRAMITE"] {
    background-color: #17a2b8;
}

.badge-estatus.en_proceso,
.badge-estatus[data-estatus="EN_PROCESO"] {
    background-color: #fd7e14;
}

.badge-estatus.resuelto,
.badge-estatus[data-estatus="RESUELTO"] {
    background-color: #20c997;
}

.badge-estatus.cerrado,
.badge-estatus[data-estatus="CERRADO"] {
    background-color: #343a40;
}