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

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.main-header {
    background: linear-gradient(135deg, #1a5276 0%, #2c3e50 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img {
    max-height: 50px;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.logo-area h1 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    color: white;
}

.logo-area small {
    font-size: 0.7rem;
    opacity: 0.8;
    color: white;
}

.fecha-actual {
    font-size: 0.8rem;
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
}

.nav-menu {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.nav-menu .container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-menu a {
    color: #2c3e50;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a i {
    font-size: 1rem;
}

.nav-menu a:hover {
    background: #e8f4f8;
    color: #1a5276;
}

.main-content {
    min-height: calc(100vh - 180px);
    padding-bottom: 30px;
}

.main-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.card-custom {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    margin-bottom: 20px;
}

.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-header-custom {
    background: linear-gradient(135deg, #1a5276 0%, #2c3e50 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 12px 20px;
    font-weight: 600;
}

.btn-custom-primary {
    background: #1a5276;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    transition: all 0.3s;
    color: white;
}

.btn-custom-primary:hover {
    background: #2c3e50;
    transform: translateY(-1px);
    color: white;
}

.main-footer {
    background: #2c3e50;
    color: #95a5a6;
    text-align: center;
    padding: 15px;
    font-size: 0.75rem;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .logo-area h1 {
        font-size: 0.9rem;
    }
    .nav-menu a {
        padding: 6px 10px;
        font-size: 0.7rem;
    }
    .nav-menu a i {
        font-size: 0.8rem;
    }
}

.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.alert-info {
    background-color: #e3f2fd;
    border-color: #bbdef5;
    color: #1565c0;
}

.selector-tramite {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.card-total {
    transition: transform 0.2s;
}

.card-total:hover {
    transform: translateY(-5px);
}

.diferencia-cero {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.diferencia-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-sm {
    margin: 2px;
}

.celda-con-signo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    width: 100%;
    height: 100%;
}

.resultado-item {
    cursor: pointer;
    transition: background 0.2s;
}

.resultado-item:hover {
    background-color: #e3f2fd !important;
}

#resultadosBusqueda {
    max-height: 300px;
    overflow-y: auto;
}